diff --git a/chapter2.lisp b/chapter2.lisp index d9a6980..f39c12a 100644 --- a/chapter2.lisp +++ b/chapter2.lisp @@ -123,3 +123,9 @@ and upper bound." (if (null (cdr l)) l (last-pair (cdr l)))) + +;; Exercise 2.18 +(defun reverse-user (l) + (if (null l) + () + (append (reverse-user (cdr l)) (list (car l)))))