diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-01-29 16:29:05 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-01-29 16:29:05 +0800 |
commit | 0135b3ac0d41dda2a4c210e7c3989f20b672be5d (patch) | |
tree | 7284971efac168e9c704ec74e50cf4ce66df6916 /p1.hs | |
parent | edcc6ba8ca9d6b883b59548eb8bb5e312c73f43b (diff) | |
download | h99-0135b3ac0d41dda2a4c210e7c3989f20b672be5d.tar.gz h99-0135b3ac0d41dda2a4c210e7c3989f20b672be5d.tar.bz2 h99-0135b3ac0d41dda2a4c210e7c3989f20b672be5d.zip |
p1+ p2
Diffstat (limited to 'p1.hs')
-rw-r--r-- | p1.hs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3,3 +3,7 @@ myLast :: [a] -> a myLast [] = error "Empty List" myLast [x] = x myLast (x:xs) = myLast xs + +myLast' = foldl1 (flip const) + +myLast'' = foldl1 (curry snd) |