Created
December 6, 2018 17:29
-
-
Save Akii/c070527ad2e0e7d1876e74919213e057 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance (Ord a) => Ord [a] where | |
compare [] [] = EQ | |
compare [] (_:_) = LT | |
compare (_:_) [] = GT | |
compare (x:xs) (y:ys) = case compare x y of | |
EQ -> compare xs ys | |
other -> other |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment