The Department of Computer Science & Engineering
cse@buffalo

CSE202: Programming in Lisp

Course
Grades
Email

Welcome

Policies
    Grades
    Inc
    Intgrty

Preface
Part I
  Chap 1
  Chap 2
  Chap 3
  XEmacs
  Chap 4
  Chap 5
  Chap 6
  Chap 7
  Chap 8
  Chap 9
Part II
  Chap 10
  Chap 11
  Chap 12
  Chap 13
  Chap 14
  Chap 15
  Chap 16
  Chap 17
  Chap 18
  Chap 19
  Chap 20
  Chap 21
  Chap 22
  Chap 23
Part III
  Chap 24
  Chap 25
  Chap 26
  Chap 27
  Chap 28
  Chap 29
  Chap 30
  Chap 31
  Chap 32
CHAPTER 19: THE EVALUATOR
Corrections
  1. Page 143, line 17: Change using backquote to using the backquote.

  2. Page 145, Exercise 19.2: Change the numbering from
    1. (eval 5)
    2. (eval a)
    3. (eval 'a)
    4. (eval ''a)
    5. (eval (first (a))) (eval (first '(a)))
    6. (eval '(first (a)))
    7. (eval '(first '(a)))
    8. (eval (cons 'first '((a))))
    9. (eval (cons 'first '('(a))))
    to
    1. (eval 5)
    2. (eval a)
    3. (eval 'a)
    4. (eval ''a)
    5. (eval (first (a)))
    6. (eval (first '(a)))
    7. (eval '(first (a)))
    8. (eval '(first '(a)))
    9. (eval (cons 'first '((a))))
    10. (eval (cons 'first '('(a))))

  3. Page 146, line -3: Change others to integers.

  4. Page 147, line -3: Change (d) to (p2).

  5. Page 147, line -1: Change on to in.

Notes
  1. Read Chapter 19

  2. On page 144, I say, "consider the function prefix you have stored in the file named calculator." This would only have been done by those doing Project P2. Since none of you are, assume that prefix works as described, and notice how compute evals its results.

  3. Do Exercises 19.1 - 19.4 to the extent you feel you need to in order to understand the material.

  4. Submit a file named ch19.cl that contains code in the ch19 package to define the functions lazy-first, lazy-rest, lazy-nth, fibonacci-from, relatively-prime, and primes-from, as described in Exercises 19.5 - 19.9.

Next

Copyright © 1999, 2000 by Stuart C. Shapiro. All rights reserved.

Stuart C. Shapiro <shapiro@cse.buffalo.edu>