
29 Jan
2010
29 Jan
'10
2:07 a.m.
Hi All. Does exist a simple way to check if a lists xs is a subset of another list ys? Thanks in advance Luca. _________________________________________________________________ Tell us your greatest, weirdest and funniest Hotmail stories http://clk.atdmt.com/UKM/go/195013117/direct/01/

29 Jan
29 Jan
11:13 a.m.
On Fri, 2010-01-29 at 07:07 +0000, Luca Ciciriello wrote:
Hi All.
Does exist a simple way to check if a lists xs is a subset of another list ys?
Thanks in advance
Luca.
xs `subsetOf` ys = null $ filter (not . (`elem` ys)) xs I.e. We take all elements which are not in potential superset and if there is none then the list is subset. Regards
5590
Age (days ago)
5590
Last active (days ago)
1 comments
2 participants
participants (2)
-
Luca Ciciriello
-
Maciej Piechotka