mirror of
https://github.com/iritmaximus/haskell.git
synced 2026-10-12 19:13:39 +03:00
6 ex1
This commit is contained in:
+4
-1
@@ -13,7 +13,10 @@ data Country = Finland | Switzerland | Norway
|
||||
deriving Show
|
||||
|
||||
instance Eq Country where
|
||||
(==) = todo
|
||||
Finland == Finland = True
|
||||
Switzerland == Switzerland = True
|
||||
Norway == Norway = True
|
||||
_ == _ = False
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Ex 2: implement an Ord instance for Country so that
|
||||
|
||||
Reference in New Issue
Block a user