From 02d9418f9a55b3d8e130e01475565050ddfb8b46 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 10 Aug 2010 15:56:15 -0500 Subject: [PATCH] document match* --- collects/scribblings/reference/match.scrbl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/collects/scribblings/reference/match.scrbl b/collects/scribblings/reference/match.scrbl index 316b9cf90e..a2b048e9e2 100644 --- a/collects/scribblings/reference/match.scrbl +++ b/collects/scribblings/reference/match.scrbl @@ -355,7 +355,20 @@ In more detail, patterns match as follows: @; ---------------------------------------------------------------------- -@section{Combined Matching Forms} +@section{Additional Matching Forms} + +@defform/subs[(match* (val-expr ...+) clause* ...) + ([clause* [(pat ...+) expr ...+] + [(pat ...+) (=> id) expr ...+]])]{ +Matches a sequence of values against each clause in order, matching +only when all patterns in a clause match. Each clause must have the +same number of patterns as the number of @racket[val-expr]s. + +@examples[#:eval match-eval +(match* (1 2 3) + [(_ (? number?) x) (add1 x)]) +] +} @defform[(match-lambda clause ...)]{