BiMap.fetch
You're seeing just the function
fetch
, go back to BiMap module for more information.
Specs
Fetches the value for specific key
in bimap
If key
is present in bimap
with value value
, then {:ok, value}
is
returned. Otherwise, :error
is returned.
Examples
iex> BiMap.fetch(BiMap.new(), :a)
:error
iex> bimap = BiMap.new([a: 1])
iex> BiMap.fetch(bimap, :a)
{:ok, 1}
iex> BiMap.fetch(bimap, :b)
:error