A.Vector.dedup

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

Specs

dedup(t(val)) :: t(val) when val: value()

Returns a copy of the vector where all consecutive duplicated elements are collapsed to a single element.

Elements are compared using ===/2.

If you want to remove all duplicated elements, regardless of order, see uniq/1.

Examples

iex> A.Vector.new([1, 2, 3, 3, 2, 1]) |> A.Vector.dedup()
vec([1, 2, 3, 2, 1])
iex> A.Vector.new([1, 1, 2, 2.0, :three, :three]) |> A.Vector.dedup()
vec([1, 2, 2.0, :three])