diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-09-04 10:00:43 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-09-04 10:00:43 -0700 |
commit | 1405510b9cfaf454c959dca021b3f0bc87cb3f9c (patch) | |
tree | abed1aafb53d9ce0bd2aca9b1de444d79d9ccf6e | |
parent | c5985ee382ef9e11322346b25504216fa8a87510 (diff) | |
download | txr-1405510b9cfaf454c959dca021b3f0bc87cb3f9c.tar.gz txr-1405510b9cfaf454c959dca021b3f0bc87cb3f9c.tar.bz2 txr-1405510b9cfaf454c959dca021b3f0bc87cb3f9c.zip |
doc: mention newer macros in pattern matching
* txr.1: Structural Pattern Matching info now mentions and
describes the two never macros.
-rw-r--r-- | txr.1 | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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 . @@ -41500,6 +41502,12 @@ 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 pattern and zero or more forms. The first case whose pattern matches the object @@ -41507,6 +41515,12 @@ 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 is matched against multiple clauses similarly to |