3 ms·
Wouldn’t a filter() achieve the same result?
by jackjeff 9y ago
Wouldn’t a filter() achieve the same result?
- neurotrace 9y agoNo, filter() still visits everything in the list, it just takes a predicate to decide if that item is added to a new list. some() or every() can be used for early termination though.