From ebe5138cfc7be1f852f8b110e4c1fdbc8fbf87dc Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 15 Jun 2008 11:25:05 +0000 Subject: [PATCH] doc match-let as 'destructuring bind' svn: r10266 --- collects/scribblings/guide/match.scrbl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/collects/scribblings/guide/match.scrbl b/collects/scribblings/guide/match.scrbl index 42eb3e1512..d10296ec1e 100644 --- a/collects/scribblings/guide/match.scrbl +++ b/collects/scribblings/guide/match.scrbl @@ -121,4 +121,19 @@ pattern variables can be bound to lists of lists of matches: For information on many more pattern forms, see @schememodname[scheme/match]. +Forms like @scheme[match-let] and @scheme[match-lambda] support +patterns in positions that otherwise must be identifiers. For example, +@scheme[match-let] generalizes @scheme[let] to a @as-index{destructing +bind}: + +@interaction[ +#:eval match-eval +(match-let ([(list x y z) '(1 2 3)]) + (list z y x)) +] + +For information on these additional forms, see @schememodname[scheme/match]. + +@refdetails["match"]{pattern matching} + @close-eval[match-eval]