A.Vector.reverse

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

Specs

reverse(t(val)) :: t(val) when val: value()

Returns the vector in reverse order.

Runs in linear time.

Examples

iex> A.Vector.new(1..12) |> A.Vector.reverse()
vec([12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])

Specs

reverse(t(val), Enumerable.t()) :: t(val) when val: value()

Returns the vector in reverse order, and concatenates the tail (enumerable).

Runs in linear time.

Examples

iex> A.Vector.new(1..5) |> A.Vector.reverse(100..105)
vec([5, 4, 3, 2, 1, 100, 101, 102, 103, 104, 105])