History of Idiom 135 > diff from v46 to v47
Edit summary for version 47 by sanjarcode:
New JS implementation by user [sanjarcode]
New JS implementation by user [sanjarcode]
↷
Version 46
2021-01-07, 09:29:31
Version 47
2021-03-08, 08:26:58
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. If x is absent, keep items unchanged.
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. If x is absent, keep items unchanged.
Comments bubble
// Successive elements moved to the left by 1 step.
// Edge case - If the x is absent, splice doesn't throw an error. So it's safe.