Top Document: FAQ: Lisp Frequently Asked Questions 3/7 [Monthly posting] Previous Document: [3-14] When producing formatted output in Lisp, where should you put the newlines (e.g., before or after the line, FRESH-LINE vs TERPRI, Next Document: [3-16] My program works when interpreted but not when compiled! See reader questions & answers on this topic! - Help others by sharing your knowledge Your code probably looks something like (do ((sublist list (cdr list)) ..) ((endp sublist) ..) ..) or maybe (do ((index start (+ start 2)) ..) ((= index end) ..) ..) The problem is caused by the (cdr list) and the (+ start 2) in the first line. You're using the original list and start index instead of the working sublist or index. Change them to (cdr sublist) and (+ index 2) and your code should start working. User Contributions:Top Document: FAQ: Lisp Frequently Asked Questions 3/7 [Monthly posting] Previous Document: [3-14] When producing formatted output in Lisp, where should you put the newlines (e.g., before or after the line, FRESH-LINE vs TERPRI, Next Document: [3-16] My program works when interpreted but not when compiled! Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: ai+lisp-faq@cs.cmu.edu
Last Update March 27 2014 @ 02:11 PM
|
Comment about this article, ask questions, or add new information about this topic: