- #1
JamesBwoii
- 74
- 0
Hi, I'm trying to reverse a list in Common Lisp without using the reverse function.
I've had a go but it's not working. Can anyone help?
Thanks.
I've had a go but it's not working. Can anyone help?
Code:
(defun my-reverse(my-list)
(cond
((null my-list) nil)
(t (append (my-reverse(cdr my-list))
(list (car my-list))))))