Logo

Programming-Idioms

History of Idiom 135 > diff from v11 to v12

Edit summary for version 12 by Edward E.:
[Dart] typing mistake

Version 11

2018-01-17, 16:52:49

Version 12

2018-01-17, 16:53:49

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
items(remove(x);
Code
items.remove(x);