docs for `for/vector': warn about intreaction with continuations
This commit is contained in:
parent
0452bd791d
commit
902016265b
|
@ -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 2 ([i '(1 2 3)]) (number->string i))
|
||||||
(for/vector #:length 4 ([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))
|
(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[(
|
@deftogether[(
|
||||||
@defform[(for/hash (for-clause ...) body ...+)]
|
@defform[(for/hash (for-clause ...) body ...+)]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user