docs for `for/vector': warn about intreaction with continuations

This commit is contained in:
Matthew Flatt 2012-08-16 13:07:00 -06:00
parent 0452bd791d
commit 902016265b

View File

@ -118,7 +118,13 @@ the default argument of @racket[make-vector]).
(for/vector #:length 2 ([i '(1 2 3)]) (number->string i))
(for/vector #:length 4 ([i '(1 2 3)]) (number->string i))
(for/vector #:length 4 #:fill "?" ([i '(1 2 3)]) (number->string i))
]}
]
The @racket[for/vector] form may allocate a vector and mutate it after
each iteration of @racket[body], which means that capturing a
continuation during @racket[body] and applying it multiple times may
mutate a shared vector.}
@deftogether[(
@defform[(for/hash (for-clause ...) body ...+)]