
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Tom, On Tuesday 04 September 2001 09:00 pm, Tom Moertel wrote:
type Hypergraph a = Set (Set a)
instance Ord a => Ord (Set a) where compare x y = compare (setToList x) (setToList y)
hgraph :: Ord a => [[a]] -> Hypergraph a hgraph = mkSet . map mkSet
Now it works as expected:
Thanks for the suggestion, but isn't this a bit inefficient? Ordinarily one would like to compare two elements of a set by reference, not by content. As I write in another post, it might be possible to use another type from Edison to reach that effect. Edison is a bit complicated, so it will take some time for me to figure it out.
P.S. Nice to see a fellow K5'er on the Haskell lists. (I go my "tmoertel" on K5.)
Hi tmoertel! Nice to see you here :) Internet is a small place.
Sincerely,
- --
Eray Ozkural (exa)