Last active
August 29, 2015 13:57
-
-
Save spion/9513772 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
myequal :: Eq a => [a] -> [a] -> Bool | |
-- two empty lists are equal | |
myequal [] [] = True | |
-- two non-empty lists are equal when their first elements are equal and the remainder of the lists are also equal | |
myequal (x:xs) (y:ys) = x == y && myeqal xs ys | |
-- all other lists are not equal | |
myequal _ _ = False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment