A.Vector.delete_last-exclamation-mark
You're seeing just the function
delete_last-exclamation-mark
, go back to A.Vector module for more information.
Specs
Removes the last value from the vector
and returns the updated vector.
Raises an A.Vector.EmptyError
if empty.
Runs in effective constant time.
Examples
iex> vector = A.Vector.new(1..8)
iex> A.Vector.delete_last!(vector)
vec([1, 2, 3, 4, 5, 6, 7])
iex> A.Vector.delete_last!(A.Vector.new())
** (A.Vector.EmptyError) empty vector error