From aef78e5af1c8c178345413a91a313db23e0e0d5e Mon Sep 17 00:00:00 2001 From: Tobias Eidelpes Date: Sat, 5 Nov 2022 14:59:19 +0100 Subject: [PATCH] Add Exercise 2.18 --- chapter2.lisp | 6 ++++++ 1 file changed, 6 insertions(+) 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)))))