A.Vector.uniq_by

You're seeing just the function uniq_by, go back to A.Vector module for more information.

Specs

uniq_by(t(val), (val -> term())) :: t(val) when val: value()

Returns a copy of the vector without elements for which the function fun returned duplicate elements.

The first occurrence of each element is kept.

Examples

iex> vector = A.Vector.new([x: 1, y: 2, z: 1])
vec([x: 1, y: 2, z: 1])
iex> A.Vector.uniq_by(vector, fn {_x, y} -> y end)
vec([x: 1, y: 2])