A.OrdMap.first
You're seeing just the function
first
, go back to A.OrdMap module for more information.
Specs
Finds the fist {key, value}
pair in ord_map
.
Returns a {key, value}
entry if ord_map
is non-empty, or nil
else.
Examples
iex> A.OrdMap.new([b: "B", d: "D", a: "A", c: "C"]) |> A.OrdMap.first()
{:b, "B"}
iex> A.OrdMap.new([]) |> A.OrdMap.first()
nil
iex> A.OrdMap.new([]) |> A.OrdMap.first(:error)
:error