The third printing of the book may contain the following mistakes. They have been corrected in the online version:

The following items correct errors in the first and second printing of the book. They have all been corrected in the third printing of the book and the online version.
The problem statement correctly specifies that "[d]ecreasing the price by a dime ($.10) increases attendance by 15." Later, the book includes the sentence "The base attendance at a price of five dollars is 120, and for each 15 cents less than five dollars, 10 more attendees show up." This second claim is incorrect.
Thanks to Chuck Floyd, Kerrville, TX
The book specifies that
;;A shape is either ;;1. a circle, or ;;2. a structure.Naturally, this should be
;;A shape is either ;;1. a circle, or ;;2. a square.
Thanks to Jamie Raymond, Houston, TX
The book incorrectly defines ourcons as:
(define (ourcons avalue alist) (makepair a d))It should be
(define (ourcons avalue alist) (makepair avalue alist))
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
should be(define (ourcons avalue alist) (cond [(empty? alist) (makepair any alist)] [(ourcons? alist) (makepair any alist)] [else (error 'cons "list as second argument expected")]))
(define (ourcons avalue alist) (cond [(empty? alist) (makepair avalue alist)] [(ourcons? alist) (makepair avalue alist)] [else (error 'ourcons "list as second argument expected")]))
Thanks to Nguyen Cong Vu, Ho Chi Min City, Viet Nam
The book mistakenly specifies random
as a function that
consumes a natural number. Instead, random
consumes an integer
greater than or equal to 1 (and less than or equal to 2147483647).
Thanks to Marvin D. Hernandez, Miami, FL
The exercise had been misinterpreted twice. The new wording is: and produces a list of that many numbers, each randomly chosen from the range from 20 to 120.
Develop the functiontiedyed
. It consumes a natural number and produces a list of that many numbers, each randomly chosen in the range from20
to120
. Usetiedyed
to applydrawcircles
from exercise~9.5.8.
Thanks to Stephen Bloch, New York, NY
The section switches from the development of a descending sort to that
of an ascending sort during the transition from the development of
sort
to the development of insert
.
Figure 33 (page 175) should be as follows:
;; 
Thanks to Daniel P. Friedman, Bloomington, IN
"makestructure" should be "makemail".
We have added the following paragraph at the end of the page:
Also, use the Scheme operation append
, which consumes two lists
and produces the concatenation of the two lists. For example:
(append (list 'a 'b 'c) (list 'd 'e)) = (list 'a 'b 'c 'd 'e)
Thanks to Stephen Bloch, Garden City, NY
(listpick (cons 'a empty) 3) ;; expected value: false
should be(listpick (cons 'a empty) 3) ;; expected value: (error 'listpick "...")
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
Replace all occurrences of
(define (listpick n alos)
with
(define (listpick alos n)
Thanks to Jesse Janzer and Matthew Litman, Atlanta, GA.
Replace all occurrences of false
with
(error 'listpick "list too short")
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
4. (+ (local ((define (f x) (g (+ x 1))) (define (g x y) (+ x y))) (f 10)) 555)should be
4. (+ (local ((define (f x) (g (+ x 1) 22)) (define (g x y) (+ x y))) (f 10)) 555)
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
Abstract the functionsExercise 21.4.2 should read:drawacircle
andclearacircle
into a single functionprocesscircle
.
Definetranslatecircle
usingprocesscircle
.
Abstract the functionsdrawarectangle
andcleararectangle
into a single functionprocessrectangle
.
Definetranslaterectangle
usingprocessrectangle
.
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
The definition of sort
is incorrect. It should be as
follows:

Thanks to David Kay, Irvine, CA
The enumerations are missing a number each. Here are the correct versions:
1. 18 is evenly divisible by 1, 2, 3, 6, 9, and 18; 2. 24 is evenly divisible by 1, 2, 3, 4, 6, 8, 12, and 24.
Thanks to Daniel P. Friedman, Bloomington, IN
The sequence of Bezier images is misleading. Here is an improved version:
Design file>listofchecks
. The function consumes a file of
numbers and outputs a list of restaurant records.
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
The application of makelastitem
in invert
receives the arguments in the wrong order:
(define (invert alox) (cond [(empty? alox) empty] [else (makelastitem (first alox) (invert (rest alox)))])) 
Thanks to Daniel P. Friedman, Bloomington, IN
"Its solution is x = 2, y = 1, and z = 1"in reference to the listspecified system of equations. Instead, it should read:
"Its solution is x = 1, y = 1, and z = 1"
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
Figure 81 contains a mistake in the definition of
vectorsum
. Here is the correct version:
;; 
Thanks to Nguyen Cong Vu, Open University, Ho Chi Minh City, Viet Nam
The function definition in exercise 37.2.7 should read as follows:
(define (reveallist! cw sw guess) (local ((define (revealone chosenletter statusletter) (cond [(symbol=? chosenletter guess) guess] [else statusletter]))) (set! statusword (map revealone cw sw)))) 
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
In exercise 38.4.3, part 3 the program is illegal in Advanced Scheme. Here is the corrected version:
(define (makebox x) (local ((define contents x) (define (new y) (set! contents y)) (define (peek) contents)) (list new peek))) 
Thanks to Dung X. Nguyen, Houston, TX.
In exercise 38.4.4 the makebox
function is illegal in
Advanced Scheme. Here is the corrected version:
(define (makebox x) (local ((define contents x) (define (new y) (set! contents y)) (define (peek) contents)) (list new peek))) 
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
The contract and header for countavowel
are repeatedly
misstated. Here is the correction:
;; 
Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
The definition of forinterval
should be as follows:

Thanks to Hrvoje Blazevic (Master, LPG/C Harriette N)
We have also found the following typos:
areaofdisk
program ..."
should be
"The areaofring
program ..." (R. Egli)
"for process" should be "for a process" (D.P. Friedman)
revenue : number number > number
should be
revenue : number > number
perimetercircle
should use circleradius
[not
circlelength
] (G. Hosford)
(define (tabulatefupto20 nabove20) ...)
should be
(define (tabulatefupto20 nbelow20) ...)
Hrvoje Blazevic
(drawsolidline (first apoly) (second apoly) RED)
should be
(drawsolidline (first apoly) (second apoly) 'red)
(J. Raymond)
dir
structure" in 16.3.3
(Hrvoje Blazevic)
reveallist
instead of
reveal
(Hrvoje Blazevic)
(interpretwithonedef (substitute valofarg funpara funbody) afundef)
should be
(interpretwithonedef (subst ... ... ...) afundef)
local
definitions" should be "a good
understanding of local
definitions" (D.P. Friedman)
(local ((define (f x) exp1))) exp)
should be
(local ((define (f x) exp1)) exp)
(H. Blazevic)
(local ((define PI 3))) exp)
should be
(local ((define PI 3)) exp)
(H. Blazevic)
= (define y 10) (define y1 10) (define z1 20) (+ 10 z1)was duplicated (Nguyen Cong Vu)
(cons 6 empty)
should be
(cons 4 empty)
(H. Blazevic)
filter2 : (X Y > boolean) > (Y (listof X) > (listof X))
filter2 : (X Y > boolean) > ((listof X) Y > (listof X))
(H. Blazevic)
drawmessage
:
guiitem [message%] string > true
gettext
should be textcontents
(J. Zachary)
(define digitchoosers
(buildlist 3 (lambda (i) (makechoice DIGITS))))
(define digitchoosers
(local ((define (builder i) (makechoice DIGITS)))
(buildlist 3 builder)))
(H. Blazevic)
graphline
. The operation consumes a line like
y
and a color, say, RED
." graphline
. The operation consumes a line like y
and a
color, say, 'red
." (Joe Zachary)
(define (fprime (d/dx f))))
should be
(define fprime (d/dx f)))
(H. Blazevic)
looriginations
to
destination
" should be ";; to create a path from some node on
loOs
to D
" (J. Zachary)
(findroute 'B 'D Cyclicgraph)
= ... (findroute 'B 'D Cyclicgraph) ...
= ... (findroute/list (list 'E 'F) 'D Cyclicgraph) ...
= ... (findroute 'E 'D Cyclicgraph) ...
= ... (findroute/list (list 'C 'F) 'D Cyclicgraph) ...
= ... (findroute 'C 'D Cyclicgraph) ...
= ... (findroute/list (list 'B 'D) 'D Cyclicgraph) ...
= ... (findroute 'B 'D Cyclicgraph) ...
= ...
(H. Blazevic)
norm
, which consumes a vector of numbers and
produces the square root of the sum of the squares of its
numbers. (H. Blazevic)
A second difference between the two functions concerns the order of addition. While the original version of sum adds up the numbers from right to left, the accumulatorstyle version adds them up from left to right.Furthermore, replace
(sum (gseries 1000))
with (sum (gseries #i1000))
(H. Blazevic)
allblueeyedancestors
loses"
should be
"this application of allblueeyedancestors
loses"
(D.P. Friedman)
(set! (if z x y) 5)
should be
(set! (z x y) 5)
(H. Blazevic)
define
d at toplevel variable"
should be
"a variable define
d at toplevel"
(D.P. Friedman)
chosenword
but to use '_
as the letters."
should be
"Thus, the matching action is to build a word as long as
chosenword
from '_
.
(D.P. Friedman)
chosenwor
should be
chosenword
(D.P. Friedman)
nextcolor
requires a closing ")". (D. Smith)
'sunrise@cmu
to green. (H. Blazevic)
(define (boardset! aboard i j) ...)
should be
(define (boardflip! aboard i j) ...)
(H. Blazevic)
reset : > true
should be
reset : > void
(H. Blazevic)
hand0
becomes a card with two hands"
should be
"hand0
becomes a hand with two cards"
(H. Blazevic)
(sortedinsert! 1 CLUBS hand0)
should be
(sortedinsert! 2 CLUBS hand0)
(D.P. Friedman)
manage
))"
should be
"servicemanager
))"
Furthermore, the defininition of servicemanager
should be:
(define (servicemanager msg)
(cond
[(symbol=? msg 'insert!)
(lambda (r s)
(cond
[(> r (handrank thehand))
(set! thehand (makehand r s thehand))]
[else (insertaux! r s thehand)]))]
[else (error 'managedhand "message not understood")]))
(H. Blazevic)
equalposn?: posn posn > boolean
"
should be
"equalposn : posn posn > boolean
"
(H. Blazevic)
;; eqposn? : posn posn > boolean
;; to determine whether two posn
structures
;; are affected by the same mutation
(define (equalposn p1 p2) ...)
should be
;; eqposn : posn posn > boolean
;; to determine whether two posn
structures
;; are affected by the same mutation
(define (eqposn p1 p2) ...)
"
(define (equalposn p1 p2)
"
should be
"
(define (eqposn p1 p2)
"
(H. Blazevic)
(define (equalposn p1 p2)
"
should be
"
(define (eqposn p1 p2)
"
equalposn
should always be eqposn
;; eqposn? : posn posn > boolean
;; to determine whether two posn
structures
;; are affected by the same mutation
(define (equalposn p1 p2) ...)
should be
;; eqposn : posn posn > boolean
;; to determine whether two posn
structures
;; are affected by the same mutation
(define (eqposn p1 p2) ...)
(H. Blazevic)
(define (partition V left right)
(local ((define pivotposition left)
(define thepivot (vectorref V left))
(define (partitionaux left right)
(local ((define newright (findnewright V thepivot right left))
(define newleft (findnewleft V thepivot left right)))
... )))
(partition left right)))
should be
(define (partition V left right)
(local ((define pivotposition left)
(define thepivot (vectorref V left))
(define (partitionaux left right)
(local ((define newright (findnewright V thepivot left right))
(define newleft (findnewleft V thepivot left right)))
... )))
(partitionaux left right)))
(H. Blazevic)
(define (partition V left right)
(local ((define pivotposition left)
(define thepivot (vectorref V left))
(define (partitionaux left right)
(local ((define newright (findnewright V thepivot right left))
(define newleft (findnewleft V thepivot left right)))
(cond
[(>= newleft newright)
(begin
(swap V pivotposition newright)
newright)]
[else
(begin
(swap V newleft newright)
(partitionaux newleft newright))]))))
(partitionaux left right)))
should be
(define (partition V left right)
(local ((define pivotposition left)
(define thepivot (vectorref V left))
(define (partitionaux left right)
(local ((define newright (findnewright V thepivot left right))
(define newleft (findnewleft V thepivot left right)))
(cond
[(>= newleft newright)
(begin
(swap V pivotposition newright)
newright)]
[else ; (< newleft newright)
(begin
(swap V newleft newright)
(partitionaux newleft newright))]))))
(partitionaux left right)))
(H. Blazevic)
(list 1.10 329/300 328/300)
should be
(list 1.10 329/300 82/75)
(H. Blazevic)