flâneur — a map of the web's best reading

99 questions/1 to 10 - HaskellWiki

wiki.haskell.org · 587 words · saved by 1 readers

This is part of Ninety-Nine Haskell Problems, based on Ninety-Nine Prolog Problems and Ninety-Nine Lisp Problems.

99 questions/1 to 10 - HaskellWiki Jump to content From HaskellWiki < 99 questions This is part of Ninety-Nine Haskell Problems , based on Ninety-Nine Prolog Problems and Ninety-Nine Lisp Problems . Problem 1 (*) Find the last element of a list. Solutions &#160; (Note that the Lisp transcription of this problem is incorrect.) Example in Haskell: λ> myLast [1,2,3,4] 4 λ> myLast ['x','y','z'] 'z' Problem 2 (*) Find the last-but-one (or second-last) element of a list. Solutions &#160; (Note that the Lisp transcription of this problem is incorrect.) Example in Haskell: λ> myButLast [1,2,3,4] 3 λ>

Explore this link on the map →

saved by

related reading