H-99: Ninety-Nine Haskell Problems

From HaskellWiki
Revision as of 03:55, 12 December 2006 by Jcreigh (talk | contribs) (Created page with first problem filled in)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These are Haskell translations of Ninety Nine Lisp Problems.

Problem 1

(*) Find the last box of a list.
* (my-last '(a b c d))

This is "last" in Prelude, which is defined as:

last :: [a] -> a
last [x] = x
last (_:xs) = last xs