Data.Set subset function?

I don't see a subset function in Data.Set. What is the preferred way to define this? I currently have: a `subset` b = isEmptySet (a `minusSet` b) (Hmmm... does library style prefer `subset`, `subsetOf`, `isSubset`, `isSubsetOf` ?) #g ------------ Graham Klyne For email: http://www.ninebynine.org/#Contact

Graham Klyne wrote:
I don't see a subset function in Data.Set. What is the preferred way to define this?
I currently have:
a `subset` b = isEmptySet (a `minusSet` b)
Maybe add a speedup: size a <= size b && isEmptySet (a `minusSet` b) (Computing the size should be cheap)
(Hmmm... does library style prefer `subset`, `subsetOf`, `isSubset`, `isSubsetOf` ?)
According to http://users.skynet.be/jyp/DData/doc/ it should be `isSubsetOf` (but `subset` is also fine for me) Christian
participants (2)
-
Christian Maeder
-
Graham Klyne