forked from mwand/eopl3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrata.txt
116 lines (92 loc) · 2.56 KB
/
errata.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
Errata: 1st Printing EOPL3
Updated Sun Jan 12 22:39:19 2014
Page 44:
Exercise 2.19:
move-to-left => move-to-left-son
move-to-right => move-to-right-son
Page 45:
Exercise 2.20
at-leaf? is already in exercise 2.19
Page 84:
Exercise 3.32
mututally => mutually
Page 101:
Exercise 3.39
Delete "and 'unpack'"
Page 124:
Section 4.4:
Line 5:
newpair ==> make-pair
Page 195:
Figure 6.1, in apply-cont, the case for fact1-cont:
(begin
(set! cont saved-cont)
(set! n saved-n)
(apply-cont))))))
==>
(begin
(set! cont saved-cont)
(set! val (* val saved-n)) ;; changed here
(apply-cont)))
Page 196, Figure 6.2, next-to-last line of apply-cont:
(set! n saved-n)
=>
(set! val (* val saved-n))
Page 208:
a-program ==> cps-a-program
const-exp ==> cps-const-exp
var-exp ==> cps-var-exp
Page: 209:
The contract should be
apply-procedure/k : Proc * ExpVal * Cont -> ExpVal.
Also, "cps-" should precede "let-exp", "letrec-exp",
"if-exp", and "call-exp".
Page: 216:
Line 10 (line 4 of the second display):
The last paren should be preceded by ">>", leading to "exp_n>> K) >>)"
Lines 9 and 14 of the final display:
The two closing parentheses should each be preceded by ">>" leading to ">>) >>)"
Page 217:
Line 7 of last display
There is an unmatched set of <<'s and >>'s.
Need to move the '>>' to the next term following an equal sign
and have it follow the "K)"
Page 219:
The type and name say it is for cps-of-diff-exp, but
the code is for cps-of-sum-exp. So, we need the type:
cps-of-sum-exp : Listof (InpExp) * SimpleExp -> TfExp
Page 223:
The type left off the type of the letrec-body.
It is, of course, just InpExp. Here is what the type should say.
;; cps-of-letrec-exp :
Listof(Listof(Var)) * Listof(InpExp) * InpExp * SimpleExp -> TfExp
Page 265
Section 7.4.3
optype ==> otype
Page 230
Line -4
apply-procedure ==> apply-procedure/k
Page 231
Line 2
apply-procedure ==> apply-procedure/k
Page 290
Exercise 8.5
interface
[even : int -> bool
odd : int -> bool]
=>
interface
[even : (int -> bool)
odd : (int -> bool)]
Page 337 et seq:
The code in
https://github.com/mwand/eopl3/blob/master/chapter9/classes is
inconsistent . data-structures.scm defines ExpVal to include objects,
with the injector obj-val. However, the rest of the interpreter
doesn't use obj-val. Objects are passed around without the wrapper.
The code still works, because method-call-exp doesn't check to see
whether its argument is an object. method-call-exp should call a
function like expval->obj, in the same way that diff-exp calls
expval->num.
Page 378: Line 2:
Delete ", and"