fix guide typos

svn: r10862
This commit is contained in:
Matthew Flatt 2008-07-22 14:36:28 +00:00
parent 0f984fbc02
commit 2e7047b87f
4 changed files with 7 additions and 7 deletions

View File

@ -43,7 +43,7 @@ sometimes said to have an @defterm{implicit begin}.
@defexamples[
(define (print-triangle height)
(cond
[(not (positive? height))
[(positive? height)
(display (make-string height #\*))
(newline)
(print-triangle (sub1 height))]))

View File

@ -15,7 +15,7 @@ of an expression to the values for the clause:
Each @scheme[_datum] will be compared to the result of the first
@scheme[_expr] using @scheme[eqv?]. Since @scheme[eqv?] doesn't work on
many kinds of values, notably symbols and lists, each @scheme[_datum]
many kinds of values, notably strings and lists, each @scheme[_datum]
is typically a number, symbol, or boolean.
Multiple @scheme[_datum]s can be supplied for each clause, and the

View File

@ -62,15 +62,15 @@ the answer.
@specform[(and expr ...)]
An @scheme[or] form produces @scheme[#f] if any of its @scheme[expr]s
An @scheme[and] form produces @scheme[#f] if any of its @scheme[_expr]s
produces @scheme[#f]. Otherwise, it produces the value of its last
@scheme[_expr]. As a special case, @scheme[(and)] produces
@scheme[#t].
@specform[(or expr ...)]
The @scheme[and] form produces @scheme[#f] if any of its
@scheme[_expr]s produces @scheme[#f]. Otherwise, it produces the first
The @scheme[or] form produces @scheme[#f] if all of its
@scheme[_expr]s produce @scheme[#f]. Otherwise, it produces the first
non-@scheme[#f] value from its @scheme[expr]s. As a special case,
@scheme[(or)] produces @scheme[#f].
@ -87,7 +87,7 @@ non-@scheme[#f] value from its @scheme[expr]s. As a special case,
If evaluation reaches the last @scheme[_expr] of an @scheme[and] or
@scheme[or] form, then the @scheme[_expr]'s value directly determines
the @scheme[and] or @scheme[or] result. Therefore, the last
@scheme[expr] is in tail position, which means that the above
@scheme[_expr] is in tail position, which means that the above
@scheme[got-milk?] function runs in constant space.
@guideother{@secref["tail-recursion"] introduces tail calls and tail positions.}

View File

@ -99,7 +99,7 @@ extra first argument. Also, a starting ``current'' value must be
provided before the lists:
@interaction[
(foldl (lambda (v elem)
(foldl (lambda (elem v)
(+ v (* elem elem)))
0
'(1 2 3))