
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Solutions and exercises for the optional lisp assignment from cs 380 course in fall 2006. Various topics such as evaluating expressions, creating cons expressions, using car and cdr, defining functions, and understanding box notation. Students will find answers to questions related to these topics, as well as examples and exercises to practice their skills.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

(a) (+ (- 5 1) (+ 3 7)) (b) (list 1 (+ 2 3)) (c) (if (listp 1) (+ 1 2) (+ 3 4)) (d) (list (and (listp 3) t) (+ 1 2))
[1]> (new-union ’(a b c) ’(b a d)) (A B C D)
[1]> (reverse-integer 12345) 54321
Many of these problems were adapted from ANSI Common Lisp by Paul Graham (ISBN 0-13-370875-6): the book that used to be required for this class.
(^1) Since you don’t necessarily own a book on Lisp (one such book used to be used for this class), you will only be responsible for knowing box notation if we cover it in class.