Pattern Matching
Pattern matching destructures values and dispatches on their shape. It works on enum variants, literals, and wildcards, and can be used as both a statement and an inline expression.
|
|
Match can be used inline as an expression. |
|
$ pyr run pattern-matching.pyr warm cool zero one many |