BiMap.new
You're seeing just the function
new
, go back to BiMap module for more information.
Specs
new() :: t()
Creates a new bimap.
Examples
iex> BiMap.new
#BiMap<[]>
Specs
Creates a bimap from enumerable
of key-value pairs.
Duplicated pairs are removed; the latest one prevails.
Examples
iex> BiMap.new([a: "foo", b: "bar"])
#BiMap<[a: "foo", b: "bar"]>
Specs
Creates a bimap from enumerable
via transform function returning key-value
pairs.
Examples
iex> BiMap.new([1, 2, 1], fn x -> {x, x * 2} end)
#BiMap<[{1, 2}, {2, 4}]>