A.OrdMap.replace-exclamation-mark
You're seeing just the function
replace-exclamation-mark
, go back to A.OrdMap module for more information.
Specs
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.replace!(ord_map, :b, "Buffalo")
ord(%{a: "Ant", b: "Buffalo", c: "Cat"})
iex> A.OrdMap.replace!(ord_map, :d, "Dinosaur")
** (KeyError) key :d not found in: ord(%{a: "Ant", b: "Bat", c: "Cat"})