Associative array/Merging: Difference between revisions
Content added Content deleted
(Added Go) |
(Add Factor) |
||
Line 43: | Line 43: | ||
|} |
|} |
||
=={{header|Factor}}== |
|||
The <code>assoc-union</code> word does this. <code>assoc-union!</code> is a variant that mutates the first associative array. |
|||
{{works with|Factor|0.99 2019-10-06}} |
|||
<lang factor>USING: assocs prettyprint ; |
|||
{ { "name" "Rocket Skates" } { "price" 12.75 } { "color" "yellow" } } |
|||
{ { "price" 15.25 } { "color" "red" } { "year" 1974 } } |
|||
assoc-union .</lang> |
|||
{{out}} |
|||
<pre> |
|||
V{ |
|||
{ "name" "Rocket Skates" } |
|||
{ "price" 15.25 } |
|||
{ "color" "red" } |
|||
{ "year" 1974 } |
|||
} |
|||
</pre> |
|||
=={{header|Go}}== |
=={{header|Go}}== |