Skip to content

Instantly share code, notes, and snippets.

@noelworden
Last active July 17, 2020 23:38
Show Gist options
  • Select an option

  • Save noelworden/7d11203b0baa6b36544087e78f125d25 to your computer and use it in GitHub Desktop.

Select an option

Save noelworden/7d11203b0baa6b36544087e78f125d25 to your computer and use it in GitHub Desktop.
#blog_snippets
iex> Map.update!(example_map, :delta, fn delta -> delta <> " and four" end)
** (KeyError) key :delta not found in: %{alpha: "one", bravo: "two", charlie: "three"}
(stdlib 3.12.1) :maps.get(:delta, %{alpha: "one", bravo: "two", charlie: "three"})
(elixir 1.10.3) lib/map.ex:272: Map.update!/3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment