[Haskell-beginners] Empty list
Max Voit
max.voit+mlhb at with-eyes.net
Wed Mar 25 14:12:49 UTC 2015
Hi Shishir,
(in the following I'm ignoring the problem that lists have order and
elements may be in there multiple times)
On Wed, 25 Mar 2015 13:55:11 +0000
Shishir Srivastava <shishir.srivastava at gmail.com> wrote:
> Shouldn't the empty set by definition be the element of all sets
> including a non-empty set ?
This is not even true in the mathematical sense. True are:
a) all power sets include the empty set as an *element*
b) the empty set is a *subset* of all sets
For case (a) you'd need a list of lists since a powerset is a set of
sets.
For (b) `elem` is not the correct function.
Max
More information about the Beginners
mailing list