A.Vector.pop_at-exclamation-mark
You're seeing just the function
pop_at-exclamation-mark
, go back to A.Vector module for more information.
Specs
(Inefficient) Returns and removes the value at the specified index
in the vector
.
Raises an A.Vector.IndexError
if index
is out of bounds.
Supports negative indexing from the end of the vector
.
Runs in linear time. Its usage is discouraged, see the Efficiency guide.
Examples
iex> vector = A.Vector.new(1..8)
iex> {5, updated} = A.Vector.pop_at!(vector, 4); updated
vec([1, 2, 3, 4, 6, 7, 8])
iex> A.Vector.pop_at!(vector, -9)
** (A.Vector.IndexError) out of bound index: -9 not in -8..7