A.OrdMap.update-exclamation-mark

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

update!(ord_map, key, fun)

View Source

Specs

update!(t(k, v), k, v) :: t(k, v) when k: key(), v: value()

Puts a value under key only if the key already exists in ord_map.

If key is not present in ord_map, a KeyError exception is raised.

Examples

iex> ord_map = A.OrdMap.new(a: "Ant", b: "Bat", c: "Cat")
iex> A.OrdMap.update!(ord_map, :b,  &String.upcase/1)
ord(%{a: "Ant", b: "BAT", c: "Cat"})
iex> A.OrdMap.update!(ord_map, :d, &String.upcase/1)
** (KeyError) key :d not found in: ord(%{a: "Ant", b: "Bat", c: "Cat"})