;;; Exercice 1 ;; 1- ;; 2- ;; 3- ;; 4- ;; 5- ;; 6- ;; 7- ;; 8- ;;; Exercice 2 (defun D (n i) (if (> i n) '() (cons i (append (D n (* 2 i)) (D n (1+ (* 2 i))))))) (defun D-n (n) (lambda (i) (D n i))) (funcall (D-n 53) 10) ;;; Exercice 3 (defun count-pairs (tree) (if (atom tree) 0 (1+ (+ (count-pairs (car tree)) (count-pairs (cdr tree)))))) ;; (count-pairs '((1 . 2) (3 . 4) (5 . 6))) => 6