Skip to content

Instantly share code, notes, and snippets.

@Akii
Created December 6, 2018 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akii/c070527ad2e0e7d1876e74919213e057 to your computer and use it in GitHub Desktop.
Save Akii/c070527ad2e0e7d1876e74919213e057 to your computer and use it in GitHub Desktop.
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