Map.update-exclamation-mark

You're seeing just the function update-exclamation-mark, go back to Map module for more information.

Specs

update!(map(), key(), (existing_value :: value() -> new_value :: value())) ::
  map()

Updates key with the given function.

If key is present in map then the existing value is passed to fun and its result is used as the updated value of key. If key is not present in map, a KeyError exception is raised.

Examples

iex> Map.update!(%{a: 1}, :a, &(&1 * 2))
%{a: 2}

iex> Map.update!(%{a: 1}, :b, &(&1 * 2))
** (KeyError) key :b not found in: %{a: 1}