From 902016265bc8b6c50a5615d467c56b438896673e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 16 Aug 2012 13:07:00 -0600 Subject: [PATCH] docs for `for/vector': warn about intreaction with continuations --- collects/scribblings/reference/for.scrbl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/collects/scribblings/reference/for.scrbl b/collects/scribblings/reference/for.scrbl index 22e4ad70bc..5ffaba809f 100644 --- a/collects/scribblings/reference/for.scrbl +++ b/collects/scribblings/reference/for.scrbl @@ -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 ...+)]