
29 Jan
2010
29 Jan
'10
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