diff --git a/collects/scribblings/reference/contracts.scrbl b/collects/scribblings/reference/contracts.scrbl index 46614a30a5..2174a13990 100644 --- a/collects/scribblings/reference/contracts.scrbl +++ b/collects/scribblings/reference/contracts.scrbl @@ -379,7 +379,7 @@ If @scheme[(values res-expr ...)] is used as the last sub-form of each values must match its respective contract.} -@defform*/subs[#:literals (any) +@defform*/subs[#:literals (any values) [(->* (mandatory-dom ...) (optional-dom ...) rest range)] ([mandatory-dom dom-expr (code:line keyword dom-expr)] [optional-dom dom-expr (code:line keyword dom-expr)] diff --git a/collects/scribblings/reference/for.scrbl b/collects/scribblings/reference/for.scrbl index dbcbcf01ed..2b0ab10a92 100644 --- a/collects/scribblings/reference/for.scrbl +++ b/collects/scribblings/reference/for.scrbl @@ -270,7 +270,9 @@ spliced into the iteration essentially as follows: (let-values ([(inner-id ...) inner-expr] ...) (if pre-guard (let _body-bindings - (loop loop-arg ...)) + (if post-guard + (loop loop-arg ...) + _done-expr)) _done-expr)) _done-expr))) ] diff --git a/collects/scribblings/reference/sequences.scrbl b/collects/scribblings/reference/sequences.scrbl index 15a7caede3..a9cc1eddc8 100644 --- a/collects/scribblings/reference/sequences.scrbl +++ b/collects/scribblings/reference/sequences.scrbl @@ -134,12 +134,12 @@ sequence?]{ Returns a sequence that contains the elements of @scheme[#t], after which the sequence ends.} @defproc[(make-do-sequence [thunk (->* () - ((any/c . -> . any/c) - (any/c . -> . any) - any/c - (() list? . ->* . any/c) - (() list? . ->* . any/c) - ((any/c) any/c . ->* . any/c)))]) + (values (any/c . -> . any/c) + (any/c . -> . any) + any/c + (any/c . -> . any/c) + (() list? . ->* . any/c) + ((any/c) any/c . ->* . any/c)))]) sequence?]{ Returns a sequence whose elements are generated by the procedures and @@ -152,26 +152,27 @@ The @scheme[thunk] results define the generated elements as follows: @itemize{ - @item{The first result is a @scheme[_next-pos] procedure that takes - the current position and returns the next position.} - - @item{The second result is a @scheme[_pos->element] procedure that takes + @item{The first result is a @scheme[_pos->element] procedure that takes the current position and returns the value(s) for the current element. It is called only once per position.} + @item{The second result is a @scheme[_next-pos] procedure that takes + the current position and returns the next position.} + @item{The third result is the initial position.} - @item{The fourth result takes the current element value(s) and - returns a true result if the sequence includes the value, and - false if the sequence should end instead of - including the value.} + @item{The fourth result takes the current position and returns a true + result if the sequence includes the value(s) for the current + position, and false if the sequence should end instead of + including the value(s).} - @item{The fifth result is like the fourth result, but it determines a - sequence end @italic{after} the current element is already - included in the sequence.} + @item{The fifth result is like the fourth result, but it takes the + current element value(s) instead of the current position.} @item{The sixth result is like the fourth result, but it takes both - the current position and the current element value(s).} + the current position and the current element values(s) and + determines a sequence end after the current element is already + included in the sequence.} }