Solution exercises from P01 to P07

This commit is contained in:
Fabio Scotto di Santolo
2025-09-05 11:59:55 +02:00
commit 54214ae0aa
7 changed files with 64 additions and 0 deletions

9
p02.el Normal file
View File

@@ -0,0 +1,9 @@
;; 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)