Files
99_lisp_problems/p01.el
2025-09-05 11:59:55 +02:00

10 lines
180 B
EmacsLisp

;; P01 (*) Find the last box of a list
(defun my-last (lst)
(cond
((eq lst '()) '())
((eq (cdr lst) '()) lst)
(t
(my-last (cdr lst)))))
(my-last '(a b c d)) ; '(d)