List.delete

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

Specs

delete([], any()) :: []
delete([...], any()) :: list()

Deletes the given element from the list. Returns a new list without the element.

If the element occurs more than once in the list, just the first occurrence is removed.

Examples

iex> List.delete([:a, :b, :c], :a)
[:b, :c]

iex> List.delete([:a, :b, :c], :d)
[:a, :b, :c]

iex> List.delete([:a, :b, :b, :c], :b)
[:a, :b, :c]

iex> List.delete([], :b)
[]