Status of nubOrd (Proposal #2629)

Bart Massey bart at cs.pdx.edu
Thu Oct 9 04:41:38 EDT 2008


Bertram Felgenhauer <bertram.felgenhauer <at> googlemail.com> writes:
> Bart Massey wrote:
> That's nubWith :: (a -> b -> Maybe b) -> b -> [a] -> [a], right?

Yep.


> All in all I must say that the design space for nub functions is
> surprisingly big. One aspect that hasn't been mentioned yet is
> special handling for finite types.

We actually did talk about it a little earlier in this sprawling
thread.  But nubWith should handle it nicely if folks care.

>   nubBool = take 2 . nub

nub works fine on Bool, but you probably want nubWith for Char.

Thanks much for the comments!

    Bart Massey
    bart <at> cs.pdx.edu



More information about the Libraries mailing list