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

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to