Last active
June 7, 2021 22:24
-
-
Save BrooklinJazz/7900a49e08ce0e2ce74a002397227c63 to your computer and use it in GitHub Desktop.
Map update syntax Elixir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| map = %{"key" => "value"} | |
| %{map | "key" => "value2"} # %{"key" => "value2"} | |
| %{map | "key2" => "value2"} | |
| # ** (KeyError) key "key2" not found | |
| main.exs:3: (file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment