Closed borkdude closed 4 years ago
I'd need to consider it, but in order for filter-remove
to be consistent with other functions, it would need to be lazy, and to have a transducer version.
I don't think laziness is going to work for this function without traversing the collection twice, which is something I wanted to optimize. Never mind then.
I sometimes find myself wanting to split a collection into two groups: one group for which a predicate holds and one group for which the predicate doesn't hold. You can use group-by for this which would return a map with a
true
andfalse
key, but after some benchmarking, this seems to be significantly faster:If there's enough interest for this function, I can make a PR for it.