Types & safe values · BUILT-IN MODULE
match
Functional matching helpers.
Quick start
use match
use option
value = option.some 5
answer = match.option value on_some on_none
say answerAPI reference
match.value subject pattern handler ... fallbackMatch values with handler functions.
比對 values with handler functions.
match.option option some_handler none_handlerMatch an Option.
比對 an Option.
match.result result ok_handler error_handlerMatch a Result.
比對 a Result.