RosettaCodeData/Task/Associative-array-Merging/Elixir/associative-array-merging-1...

5 lines
166 B
Plaintext

base = %{name: "Rocket Skates", price: 12.75, color: "yellow"}
update = %{price: 15.25, color: "red", year: 1974}
result = Map.merge(base, update)
IO.inspect(result)