Status of nubOrd (Proposal #2629)

Bart Massey bart at
Thu Oct 9 04:41:38 EDT 2008

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


> 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>

More information about the Libraries mailing list