Problem 2
(*) Find the last-but-one (or second-last) element of a list.
(Note that the Lisp transcription of this problem is incorrect.)
Example in Haskell:
myButLast [1,2,3,4]
3
myButLast [‘a’…‘z’]
‘y’
Source: https://wiki.haskell.org/index.php?title=99_questions%2F1_to_10
You must log in or register to comment.