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
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
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners