The filter function is non-intuitive

Also, fwiw, all filter implementations I’ve ever seen work this way and return an array/iterable with elements for which the predicate returns true.

3 Likes