Minor edits to `for/vector' docs.
This commit is contained in:
parent
81b1ed6e8b
commit
dca895c129
|
@ -214,7 +214,7 @@ form normally suffices with @racket[for], a @racket[when] expression
|
|||
form in a @racket[for/list] would cause the result list to contain
|
||||
@|void-const|s instead of omitting list elements.
|
||||
|
||||
The @racket[for*/list] is like @racket[for*], nesting multiple
|
||||
The @racket[for*/list] form is like @racket[for*], nesting multiple
|
||||
iterations:
|
||||
|
||||
@interaction[
|
||||
|
@ -241,8 +241,8 @@ newly-constructed vector instead of a list:
|
|||
(string-append (number->string i) ". " chapter))
|
||||
]
|
||||
|
||||
The @racket[for*/vector] behaves similarly, but the iterations are
|
||||
nested.
|
||||
The @racket[for*/vector] form behaves similarly, but the iterations are
|
||||
nested as in @racket[for*].
|
||||
|
||||
The @racket[for/vector] and @racket[for*/vector] forms also allow the
|
||||
length of the vector to be constructed to be supplied in advance. The
|
||||
|
|
|
@ -86,13 +86,10 @@ expression is a list of the results in order.
|
|||
(error "doesn't get here"))
|
||||
]}
|
||||
|
||||
@deftogether[(
|
||||
@defform*[((for/vector (for-clause ...) body ...)
|
||||
(for/vector #:length length-expr (for-clause ...) body ...))]
|
||||
@defform*[((for*/vector (for-clause ...) body ...)
|
||||
(for*/vector #:length length-expr (for-clause ...) body ...))])]{
|
||||
@defform*[((for/vector (for-clause ...) body ...+)
|
||||
(for/vector #:length length-expr (for-clause ...) body ...+))]{
|
||||
|
||||
Iterates like @scheme[for] or @scheme[for*], but the last expression
|
||||
Iterates like @scheme[for], but the last expression
|
||||
in the @scheme[body]s must produce a single value, which is placed in
|
||||
the corresponding slot of a vector. If the optional @scheme[#:length]
|
||||
form is used, then @scheme[length-expr] must evaluate to an
|
||||
|
@ -231,6 +228,8 @@ nested.
|
|||
@deftogether[(
|
||||
@defform[(for*/list (for-clause ...) body ...+)]
|
||||
@defform[(for*/lists (id ...) (for-clause ...) body ...+)]
|
||||
@defform*[((for*/vector (for-clause ...) body ...+)
|
||||
(for*/vector #:length length-expr (for-clause ...) body ...+))]
|
||||
@defform[(for*/hash (for-clause ...) body ...+)]
|
||||
@defform[(for*/hasheq (for-clause ...) body ...+)]
|
||||
@defform[(for*/hasheqv (for-clause ...) body ...+)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user