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 | c3ba107ba73b1b8be47f18deb9d84fca8e3fae9d (patch) | |
tree | abed1aafb53d9ce0bd2aca9b1de444d79d9ccf6e | |
parent | e5d7d45d81f1529886867e4331c73b8d64df3463 (diff) | |
download | txr-c3ba107ba73b1b8be47f18deb9d84fca8e3fae9d.tar.gz txr-c3ba107ba73b1b8be47f18deb9d84fca8e3fae9d.tar.bz2 txr-c3ba107ba73b1b8be47f18deb9d84fca8e3fae9d.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 |