A.Vector.prepend
You're seeing just the function
prepend
, go back to A.Vector module for more information.
Specs
(Inefficient) Prepends value
at the beginning of the vector
.
Runs in linear time because the whole vector needs to be reconstructuded, and should be avoided.
Examples
iex> A.Vector.new() |> A.Vector.prepend(:foo)
vec([:foo])
iex> A.Vector.new(1..5) |> A.Vector.prepend(:foo)
vec([:foo, 1, 2, 3, 4, 5])