A.OrdMap.get

You're seeing just the function get, go back to A.OrdMap module for more information.
Link to this function

get(ord_map, key, default \\ nil)

View Source

Specs

get(t(k, v), k, v) :: v | nil when k: key(), v: value()

Gets the value for a specific key in ord_map.

If key is present in ord_map then its value value is returned. Otherwise, default is returned.

If default is not provided, nil is used.

Examples

iex> ord_map = A.OrdMap.new(a: "Ant", b: "Bat", c: "Cat")
iex> A.OrdMap.get(ord_map, :a)
"Ant"
iex> A.OrdMap.get(ord_map, :z)
nil
iex> A.OrdMap.get(ord_map, :z, "Zebra")
"Zebra"