10 lines
203 B
EmacsLisp
10 lines
203 B
EmacsLisp
;; P02 (*) Find the last but one box of a list
|
|
(defun my-but-last (lst)
|
|
(cond
|
|
((eq lst '()) '())
|
|
((eq (cddr lst) '()) lst)
|
|
(t
|
|
(my-but-last (cdr lst)))))
|
|
|
|
(my-but-last '(a b c d)) ; '(c d)
|