Created
May 30, 2013 11:56
-
-
Save ksomemo/5677345 to your computer and use it in GitHub Desktop.
99_questions No.1
This file contains hidden or 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
myLast :: [a] -> Maybe a | |
myLast [] = Nothing | |
myLast (x:[]) = Just x | |
myLast (x:xs) = myLast xs | |
{- | |
myLast :: [a] -> a | |
-- myLast [] = | |
myLast (x:[]) = x | |
myLast (x:xs) = myLast xs | |
-} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment