Prelude Data.Set Data.List> [] `isInfixOf` [1,2,3]
True
Prelude Data.Set Data.List> (fromList []) `isSubsetOf` (fromList [1,2,3])
True
Of course `isInfixOf` is in general more restrictive than `isSubsetOf`, in the sense that the infix relationship depends on ordering, which the subset relationship does not.
Hope that helps,
-jn-
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