diff options
-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 |