From b03f2749333c010e5d9ecc90cd461a26e9b30053 Mon Sep 17 00:00:00 2001 From: Doc Mo Date: Wed, 14 Apr 2021 12:05:38 -0500 Subject: [PATCH] generator argument formals specified directly --- .../racket-doc/scribblings/reference/sequences.scrbl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/racket-doc/scribblings/reference/sequences.scrbl b/pkgs/racket-doc/scribblings/reference/sequences.scrbl index 4ed25cc994..149034d1f6 100644 --- a/pkgs/racket-doc/scribblings/reference/sequences.scrbl +++ b/pkgs/racket-doc/scribblings/reference/sequences.scrbl @@ -1395,11 +1395,13 @@ values from the generator. @racket[#f] otherwise. } -@defform[(generator formals body ...+)]{ - Creates a @tech{generator}, where @racket[formals] is like the - @racket[formals] of @racket[case-lambda] (i.e., the - @racket[_kw-formals] of @racket[lambda] restricted to non-optional - and non-keyword arguments). +@defform/subs[(generator formals body ...+) + ([formals (id ...) + (id ...+ . rest-id) + rest-id])]{ + Creates a @tech{generator}, where @racket[formals] specify the arguments. + Keyword and optional arguments are not supported. This is the same as the + @racket[formals] of @racket[case-lambda] without any matching ocurring. For the first call to a generator, the arguments are bound to the @racket[formals] and evaluation of @racket[body] starts. During the