Yves S. Garret <yoursurrogate...@gmail.com> wrote:
> ================================================Okay, here are a few hints.
> (defun custom-reverse(list-to-reverse)
> (if (equal (cdr list-to-reverse) nil)
> (car list-to-reverse)
> (cons (custom-reverse (cdr list-to-reverse))
> (cons (car list-to-reverse) nil))))
> Now, it doesn't work. At least not very well. The problem is
- How do you reverse an empty list?
- How do you reverse a non-empty list?
- Fill in the missing parts:
(DEFUN R (L)
- You will get extra points for not using APPEND.
- (EQUAL X NIL) equals (NULL X)
- (CONS X NIL) equals (LIST X)
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.