BiMultiMap.new

You're seeing just the function new, go back to BiMultiMap module for more information.

Specs

new() :: t()

Creates a new bimultimap.

Examples

iex> BiMultiMap.new
#BiMultiMap<[]>

Specs

new(Enum.t()) :: t()

Creates a bimultimap from enumerable of key-value pairs.

Duplicated pairs are removed; the latest one prevails.

Examples

iex> BiMultiMap.new([a: 1, a: 2])
#BiMultiMap<[a: 1, a: 2]>
Link to this function

new(enumerable, transform)

View Source

Specs

new(Enum.t(), (term() -> {k(), v()})) :: t()

Creates a bimultimap from enumerable via transform function returning key-value pairs.

Examples

iex> BiMultiMap.new([1, 2, 1], fn x -> {x, x * 2} end)
#BiMultiMap<[{1, 2}, {2, 4}]>