Letlang
2.3. Match Branching Expression
Overview of pattern matching based control flow
You can use a match{} expression to match against a sequence of patterns.
match{}
If no match{} clause matches, a run-time error will occur.
res := match foo() { (@ok, val) => val, (@error, _reason) => 0 };