[Haskell-beginners] Empty list

Shishir Srivastava shishir.srivastava at gmail.com
Wed Mar 25 13:55:11 UTC 2015


Hi,

Can someone please explain why this results in error -

[] `elem` [1,2,3]

Shouldn't the empty set by definition be the element of all sets including
a non-empty set ?

I am assuming 'Lists' are different from 'Sets' in Haskell, if yes, is
there a separate module for dealing/working with sets ?

Thanks,
Shishir Srivastava
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150325/dbaed094/attachment.html>


More information about the Beginners mailing list