Skip to content

Instantly share code, notes, and snippets.

@BrooklinJazz
Last active June 7, 2021 22:24
Show Gist options
  • Select an option

  • Save BrooklinJazz/7900a49e08ce0e2ce74a002397227c63 to your computer and use it in GitHub Desktop.

Select an option

Save BrooklinJazz/7900a49e08ce0e2ce74a002397227c63 to your computer and use it in GitHub Desktop.
Map update syntax Elixir
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