Introduction

You can use a match{} expression to match against a sequence of patterns.

If no match{} clause matches, a run-time error will occur.

Example

res := match foo() {
  (@ok, val) => val,
  (@error, _reason) => 0
};