diff options
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) |