History of Idiom 247 > diff from v9 to v10
Edit summary for version 10 by WHS:
New C++ implementation by user [WHS]
New C++ implementation by user [WHS]
↷
Version 9
2020-12-27, 19:00:33
Version 10
2020-12-27, 19:04:56
Idiom #247 Filter list in-place
Remove all the elements from list x that don't satisfy the predicate p, without allocating a new list.
Keep all the elements that do satisfy p.
For languages that don't have mutable lists, refer to idiom #57 instead.
Idiom #247 Filter list in-place
Remove all the elements from list x that don't satisfy the predicate p, without allocating a new list.
Keep all the elements that do satisfy p.
For languages that don't have mutable lists, refer to idiom #57 instead.
Comments bubble
Compatible with most STL containers (Exceptions: x cannot be an std::array, std::stack, or std::queue)