- cross-posted to:
- ai_detox@feddit.org
- cross-posted to:
- ai_detox@feddit.org
Problem 2
(*) Find the last-but-one (or second-last) element of a list. Solutions
(Note that the Lisp transcription of this problem is incorrect.)
Example in Haskell:
myButLast [1,2,3,4]
3
myButLast [‘a’…‘z’]
‘y’
You must log in or register to comment.