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
p03.el Normal file
View File

@@ -0,0 +1,9 @@
;; P03 (*) Find the k'th element of a list
(defun element-at (lst k)
(cond
((eq lst '()) '())
((eq k 1) (car lst))
(t
(element-at (cdr lst) (- k 1)))))
(element-at '(a b c d) 3) ; c