RosettaCodeData/Task/Associative-array-Merging/Smalltalk/associative-array-merging.st

16 lines
382 B
Smalltalk
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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.