[Haskell-beginners] Empty list
Mike Meyer
mwm at mired.org
Wed Mar 25 14:07:16 UTC 2015
On Wed, Mar 25, 2015 at 8:55 AM, Shishir Srivastava <
shishir.srivastava at gmail.com> wrote:
> 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 ?
>
Norbert gave you the information about Lists and Data.Set, but you're wrong
about the properties of the empty set. The empty set is a SUBSET of all
sets. But it's only a MEMBER of supersets of {{}}.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150325/18b6c450/attachment.html>
More information about the Beginners
mailing list