A.Vector.unzip

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

Specs

unzip(t({val1, val2})) :: {t(val1), t(val2)} when val1: value(), val2: value()

Opposite of zip/2. Extracts two-element tuples from the given vector and groups them together.

It takes a vector with elements being two-element tuples and returns a tuple with two vectors, each of which is formed by the first and second element of each tuple, respectively.

This function fails unless vector only contains tuples with exactly two elements in each tuple.

Runs in linear time.

iex> {vector1, vector2} = A.Vector.new([{1, :a}, {2, :b}, {3, :c}]) |> A.Vector.unzip()
iex> vector1
vec([1, 2, 3])
iex> vector2
vec([:a, :b, :c])