Logo

Programming-Idioms

History of Idiom 135 > diff from v34 to v35

Edit summary for version 35 by Matt:
New Elixir implementation by user [Matt]

Version 34

2020-04-29, 16:42:13

Version 35

2020-04-29, 17:47:57

Idiom #135 Remove item from list, by its value

Remove at most 1 item from list items, having value x.
This will alter the original list or return a new list, depending on which is more idiomatic. If there are several occurrences of x in items, remove only one of them.

Idiom #135 Remove item from list, by its value

Remove at most 1 item from list items, having value x.
This will alter the original list or return a new list, depending on which is more idiomatic. If there are several occurrences of x in items, remove only one of them.

Code
List.delete(items, x)
Doc URL
https://hexdocs.pm/elixir/List.html#delete/2