Devoxx - filter, partition and offset

Jed Wesley-Smith jed at
Wed Apr 3 14:50:28 PDT 2013

On 3 April 2013 22:36, Stephen Colebourne <scolebourne at> wrote:
> It didn't come up in the Devoxx lab, but I found the filter() method
> confusing when reading code in the talks. It was not obvious to me
> whether it was filtering in or out.
> I was then surprised that there was only one method in the API for
> filtering, rather than two - one to remove and one to retain. While
> clearly they are a logical not, in code readbility terms its typically
> a lot clearer.
> Perhaps keep() and reject()? I'm sure there are other names, but
> filter alone feels very unclear. (I can't remember which it is now).



Standard ML:




all define the same behaviour and name of this method.

It is sufficiently commonplace that to define it differently would be
arbitrary and random.


More information about the lambda-dev mailing list