This function is defined as (isSubmapOf = isSubmapOfBy (==)).
and
The expression (isSubmapOfBy f t1 t2) returns True if all keys in t1 are in tree t2, and when f returns True when applied to their respective values.
so use of isSubmapOf is strange to me, anyway, since then the test && M.fold (\(x1, x2) b -> b && x1leqx2) True (M.intersectionWith (,) m1 m2) appears to be redundant.
I am confused about the
PartialOrd
instance ofMap
:This results in:
Compare this with the
JoinSemiLattice
instance ofMap
, which gives:The documentation of
isSubmapOf
says:This function is defined as (isSubmapOf = isSubmapOfBy (==)).
andThe expression (isSubmapOfBy f t1 t2) returns True if all keys in t1 are in tree t2, and when f returns True when applied to their respective values.
so use of
isSubmapOf
is strange to me, anyway, since then the test&& M.fold (\(x1, x2) b -> b && x1
leqx2) True (M.intersectionWith (,) m1 m2)
appears to be redundant.