Associative array/Merging: Difference between revisions

Line 1,189:
=={{header|Smalltalk}}==
<lang smalltalk></lang>
base := Dictionary withAssociations:{
'name'-> 'Rocket Skates' .
'price' -> 12.75 .
'color' -> 'yellow' }.
 
update := Dictionary withAssociations:{
'price' -> 15.25 .
'color' -> 'red' .
'year' -> 1974 }.
result := Dictionary new
declareAllFrom:base;
declareAllFrom:update.
 
Transcript showCR: result.</lang>
{{out}}
<pre>Dictionary(name->Rocket Skates price->15.25 year->1974 color->red)</pre>
<pre></pre>
 
=={{header|Swift}}==
Anonymous user