A.OrdMap.put_new
You're seeing just the function
put_new
, go back to A.OrdMap module for more information.
Specs
Puts the given value
under key
unless the entry key
already exists in ord_map
.
Examples
iex> ord_map = A.OrdMap.new(b: "Bat", c: "Cat")
iex> A.OrdMap.put_new(ord_map, :a, "Ant")
ord(%{b: "Bat", c: "Cat", a: "Ant"})
iex> A.OrdMap.put_new(ord_map, :b, "Buffalo")
ord(%{b: "Bat", c: "Cat"})