@@ -168,7 +168,7 @@ Consider the following example:
168168
169169In standard call-by-value, this will read a byte from standard input,
170170and proceed to call @tt{f} with that read value, ignore it, and return
171- 42. In call-by-need , this program will not read any value from the
171+ 42. In call-by-name , this program will not read any value from the
172172standard input - the @tt{read-byte} will never be evaluated, as the body
173173of @tt{f} does not make use of @tt{x}.
174174
@@ -183,7 +183,7 @@ On the other hand, consider the following program:
183183
184184Again, in standard call-by-value, this will read a byte from standard
185185input, and proceed to call @tt{f} with that read value, doubling it.
186- In call-by-need , this program will result to two different calls to
186+ In call-by-name , this program will result to two different calls to
187187@tt{read-byte}, whose results will then be added together: when
188188calling @tt{(f (read-byte))}, the argument will be substituted into
189189the body of @tt{f}, yielding @tt{(+ (read-byte) (read-byte))}.
@@ -220,6 +220,15 @@ each occurence of @tt{y} in the body of f.
220220
221221This program should yield an error - we're still using static scoping!
222222
223+ @#reader scribble/comment-reader
224+ (racketblock
225+ (begin
226+ (define (f x) (let ((y 42 )) x))
227+ (let ((y 17 )) (f y)))
228+ )
229+
230+ This program should yield 17 , in both evaluation methods.
231+
223232@#reader scribble/comment-reader
224233(racketblock
225234(begin
0 commit comments