by cujo · 18y ago · 0 comments
Why not just something simple like.. (defun foo(thing) (list (nth (1- (length thing)) thing))
Same applies for problem 2.
It's still a good exercise to go through them all as a Lisp newb like myself when I'm bored or need a break.
[1] Programming language, not Portuguese. :)
Here is mine:
(defun our-last (list) (if (rest list) (our-last (rest list)) list))