List.pop_at

You're seeing just the function pop_at, go back to List module for more information.
Link to this function

pop_at(list, index, default \\ nil)

View Source (since 1.4.0)

Specs

pop_at(list(), integer(), any()) :: {any(), list()}

Returns and removes the value at the specified index in the list.

Negative indices indicate an offset from the end of the list. If index is out of bounds, the original list is returned.

Examples

iex> List.pop_at([1, 2, 3], 0)
{1, [2, 3]}
iex> List.pop_at([1, 2, 3], 5)
{nil, [1, 2, 3]}
iex> List.pop_at([1, 2, 3], 5, 10)
{10, [1, 2, 3]}
iex> List.pop_at([1, 2, 3], -1)
{3, [1, 2]}