forked from mwand/eopl3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errata.html
156 lines (116 loc) · 3.41 KB
/
errata.html
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html> <head>
<title>EOPL Errata</title>
<link type="text/css"
rel="stylesheet"
href="eopl3.css">
</head>
<body>
<h1>Errata: 1st Printing EOPL3</h1>
<p>Note: this file may not be up to date. Look at errata.txt instead.</p>
<div id="container" align="left">
<ul>
<li>
Page 29:<br>
Exercise 1.33:<br>
Line 3:<br>
integer ==> number
<p> End of first display:<br>
Add <code>)))</code> to close up <code>(mark-leaves-with-red-depth ...</code>
</li>
<li>
Page 30:<br>
Exercise 1.35:<br>
Add <code>)))</code> to close up <code>(number-leaves ...</code>
</li>
<li>
Page 124:<br>
Section 4.4:<br>
Line 5:<br>
<code>newpair</code> ==> <code>make-pair</code>
</li>
<li>
Page 195:<br>
Replace next to last line of Figure 6.1 with
<code>(set! val (* saved-n val))</code><br>
</li>
<li>
Page 196:<br>
Replace next to last line of Figure 6.2 with
<code>(set! val (* saved-n val))</code><br>
</li>
<li>
Page 208:<br>
<code>a-program</code> ==> <code>cps-a-program</code><br>
<code>const-exp</code> ==> <code>cps-const-exp<code><br>
<code>var-exp<code> ==> <code>cps-var-exp<code><br>
</li>
<li>
Page: 209:<br>
The contract should be<br>
<code>apply-procedure/k</code> : <code>Proc * ExpVal * Cont -> ExpVal.</code><br>
Also, <code>cps-</code> should precede <code>let-exp</code>, <code>letrec-exp</code>,
<code>if-exp</code>, and <code>call-exp</code>.
</li>
<li>
Page: 216:<br>
Line 10: (line 4 of the second display):<br>
The last paren should be preceded by <code>>></code>,
leading to <code>exp_n>> K) >>)</code><br>
Lines 9 and 14 of the final display:<br>
The two closing parentheses should<br>
each be preceded by <code>>></code> leading to <code>>>) >>)</code>
</li>
<li>
Page 217:<br>
Line 7 of last display:<br>
There is an unmatched set of <code><<</code>'s and <code>>></code>'s.<br>
Need to move the <code>>></code> to the next term following an equal sign<br>
and have it follow the <code>K</code>.
</li>
<li>
Page 219:<br>
The type and name say it is for <code>cps-of-diff-exp</code>, but<br>
the code is for <code>cps-of-sum-exp</code>. So, we need the type:<br>
<code>cps-of-sum-exp : Listof (InpExp) * SimpleExp -> TfExp</code>
</li>
<li>
Page 223:<br>
The type is missing the type of the <code>letrec-body</code>.<br>
It is, of course, just <code>InpExp</code>. Here is what the type should say.<br>
<code>;; cps-of-letrec-exp :</code><br>
<code>Listof(Listof(Var)) * Listof(InpExp) * InpExp * SimpleExp -> TfExp</code>
</li>
<li>
Page 230:<br>
Line -4:<br>
<code>apply-procedure</code> ==> <code>apply-procedure/k</code>
</li>
<li>
Page 231:<br>
Line 2:<br>
<code>apply-procedure</code> ==> <code>apply-procedure/k</code>
</li>
<li>
Page 236:<br>
Line 14:<br>
boolean ==> integer
</li>
<li>
Page 265:<br>
Section 7.4.3:<br>
<code>optype</code> ==> <code>otype</code>
</li>
<li>
Page 378: Line 2:
Delete ", and"
</li>
</ul>
<hr>
<address></address>
<font size=-1>
<p align=right>
<!-- hhmts start -->
Last modified: Wed Jul 25 22:49:48 -0400 2012 <!-- hhmts end -->
</body> </html>