This commit is contained in:
Aaro Koivukangas
2025-12-26 19:15:56 +02:00
parent 6ee33f5f5b
commit fc4bd44ff0
+11 -4
View File
@@ -25,10 +25,17 @@ instance Eq Country where
-- Remember minimal complete definitions! -- Remember minimal complete definitions!
instance Ord Country where instance Ord Country where
compare = todo -- implement me? compare Finland Norway = LT
(<=) = todo -- and me? compare Finland Switzerland = LT
min = todo -- and me? compare Norway Switzerland = LT
max = todo -- and me? compare Finland Finland = EQ
compare Norway Norway = EQ
compare Switzerland Switzerland = EQ
compare _ _ = GT
--(<=) = todo -- and me?
--min = todo -- and me?
--max = todo -- and me?
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- Ex 3: Implement an Eq instance for the type Name which contains a String. -- Ex 3: Implement an Eq instance for the type Name which contains a String.