Comment

Comment by ihumanable

In elixir we have Enum.filter (run a predicate over the enumerable keeping the things that match the predicate) and Enum.reject (run a predicate over the enumerable removing the thing that match the predicate)

I think since we have a pair of them and reject is so obvious it helps me remember which way filter works.

I think Enum.keep and Enum.reject might be a better pair, but I've used them enough to internalize it now

parent ihumanable 1 month ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton