A.OrdMap.pop-exclamation-mark
You're seeing just the function
pop-exclamation-mark
, go back to A.OrdMap module for more information.
Specs
Returns the value for key
and the updated ordered map without key
.
Behaves the same as pop/3
but raises if key
is not present in ord_map
.
Examples
iex> ord_map = A.OrdMap.new(a: "Ant", b: "Bat", c: "Cat")
iex> {"Bat", updated} = A.OrdMap.pop!(ord_map, :b)
iex> updated
#A.OrdMap<%{a: "Ant", c: "Cat"}, sparse?: true>
iex> A.OrdMap.pop!(ord_map, :z)
** (KeyError) key :z not found in: ord(%{a: "Ant", b: "Bat", c: "Cat"})