List.delete_at

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

Specs

delete_at(list(), integer()) :: list()

Produces a new list by removing the value at the specified index.

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.delete_at([1, 2, 3], 0)
[2, 3]

iex> List.delete_at([1, 2, 3], 10)
[1, 2, 3]

iex> List.delete_at([1, 2, 3], -1)
[1, 2]