diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-01-29 15:56:05 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-01-29 15:56:05 +0800 |
commit | edcc6ba8ca9d6b883b59548eb8bb5e312c73f43b (patch) | |
tree | 1781953c44d242c5a64a71dcfbf7ab14e00fa802 | |
download | h99-edcc6ba8ca9d6b883b59548eb8bb5e312c73f43b.tar.gz h99-edcc6ba8ca9d6b883b59548eb8bb5e312c73f43b.tar.bz2 h99-edcc6ba8ca9d6b883b59548eb8bb5e312c73f43b.zip |
p1
-rw-r--r-- | p1.hs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -0,0 +1,5 @@ + +myLast :: [a] -> a +myLast [] = error "Empty List" +myLast [x] = x +myLast (x:xs) = myLast xs |