From 1405510b9cfaf454c959dca021b3f0bc87cb3f9c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 4 Sep 2021 10:00:43 -0700 Subject: doc: mention newer macros in pattern matching * txr.1: Structural Pattern Matching info now mentions and describes the two never macros. --- txr.1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/txr.1 b/txr.1 index d1dfa23e..2dd15938 100644 --- a/txr.1 +++ b/txr.1 @@ -41478,7 +41478,9 @@ Structural pattern matching is available via several different macro operators, which are: .codn when-match , .codn if-match , +.codn match , .codn match-case , +.codn match-ecase , .code lambda-match and .codn defun-match . @@ -41499,6 +41501,12 @@ macro evaluates a single form if there is a match, in the scope of the bindings established by the pattern, otherwise an alternative form evaluated in a scope in which those bindings are absent. +The +.code match +macro tests and object against a pattern, expecting a match. If the match +fails, an exception is thrown. Otherwise, it evaluates zero or more forms +in the scope of the bindings established by the pattern. + The .code match-case macro evaluates the same object against multiple clauses, each consisting of a @@ -41506,6 +41514,12 @@ pattern and zero or more forms. The first case whose pattern matches the object is selected. The forms associated with a matching clause are evaluated in the scope the variables bound by that clause's pattern. +The +.code match-ecase +macro is similar to +.code match-case +except that if no matching case is identified, an exception is thrown. + The .code lambda-match macro provides a way to express an anonymous function whose argument list -- cgit v1.2.3