Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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

 help



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: