[Haskell-cafe] Data.Set.member vs Data.List.elem
goalieca at gmail.com
Mon Nov 12 18:28:51 EST 2007
Perhaps this has something to due with uniqueness. A list can have many
duplicate elements while a set is supposed to be unique.
On Nov 12, 2007 2:48 PM, Neil Mitchell <ndmitchell at gmail.com> wrote:
> Is there a good reason that Data.Set uses the name "member" while
> Data.List (or the Prelude) uses the name "elem", for what to me seem
> identical concepts. I realise that in Set's the traditional test is
> for "membership", but it seems awfully arbitrary that one jumped one
> way and one jumped the other. I've just written an entire module's
> worth of Haskell with Set.elem, as that "felt" right, now I'm going
> back and fixing it.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe