Dear All.
I'd like to compare fields of each record.
here is my record.
data Person = Person {name:: String, age:: Int } deriving(Show)data Relations = Friend | Older | Younger
class Comparison a wherecompare:: a -> a -> Relations
instance Comparison Person wherecompare Person a b Person a b| b1 == b2 = Friend| b1 > b2 = Older| b1 < b2 = Younger
How can I fit it?
Sincerely,
Jeon-Young Kang
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners