A.Vector.delete_last

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

Specs

delete_last(t(val)) :: t(val) when val: value()

Removes the last value from the vector and returns the updated vector.

Leaves the vector untouched 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())
vec([])