A.OrdMap.take
You're seeing just the function
take
, go back to A.OrdMap module for more information.
Returns a new ordered map with all the key-value pairs in ord_map
where the key
is in keys
.
If keys
contains keys that are not in ord_map
, they're simply ignored.
Respects the order of the keys
list.
Examples
iex> ord_map = A.OrdMap.new(a: "Ant", b: "Bat", c: "Cat")
iex> A.OrdMap.take(ord_map, [:c, :e, :a])
ord(%{c: "Cat", a: "Ant"})