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
-
- Page 143, line 17: Change using
backquote to using the backquote.
- Page 145, Exercise 19.2: Change the numbering from
- (eval 5)
- (eval a)
- (eval 'a)
- (eval ''a)
- (eval (first (a)))
(eval (first '(a)))
- (eval '(first (a)))
- (eval '(first '(a)))
- (eval (cons 'first '((a))))
- (eval (cons 'first '('(a))))
to
- (eval 5)
- (eval a)
- (eval 'a)
- (eval ''a)
- (eval (first (a)))
- (eval (first '(a)))
- (eval '(first (a)))
- (eval '(first '(a)))
- (eval (cons 'first '((a))))
- (eval (cons 'first '('(a))))
- Page 146, line -3: Change others to integers.
- Page 147, line -3: Change (d) to (p2).
- Page 147, line -1: Change on to in.
- Notes
-
- Read Chapter 19
- 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
eval s its results.
- Do Exercises 19.1 - 19.4 to the extent you feel you need to
in order to understand the material.
- 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.
|