Results 1 to 2 of 2

Thread: LISP programming question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2003
    Posts
    149

    LISP programming question

    Okay Im new to lisp and trying to figure out why this function is wrong and how to fix it. The function is supposed to reverse the given list.

    (defun reverse(list)
    (cond
    ((null list) 0)
    (T (append (list (car list)) cdr(list))))

    I thought this might be close but I know its not exactly right.

  2. #2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width