<p dir="ltr">You are correct, a list is not a set. A list is a list of things, that can be there multiple times. A set is a set of things, where nothing can be twice. So take a look at Data.Set</p>
<div class="gmail_quote">Am 25.03.2015 14:55 schrieb "Shishir Srivastava" <<a href="mailto:shishir.srivastava@gmail.com">shishir.srivastava@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>Can someone please explain why this results in error - </div><div><br></div><div>[] `elem` [1,2,3]</div><div><br></div><div>Shouldn't the empty set by definition be the element of all sets including a non-empty set ?</div><div><br></div><div>I am assuming 'Lists' are different from 'Sets' in Haskell, if yes, is there a separate module for dealing/working with sets ?</div><div><br></div><div>Thanks,</div><div><div><div><div dir="ltr"><font color="#0b5394"><font style="background-color:rgb(255,255,255)"><font face="georgia, serif">Shishir Srivastava</font></font><br></font><br></div></div></div>
</div></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div>