ref: ac7fed3ddfa3caf2e2c97f221e023b75ec9693ac
dir: /libstd/try.myr/
use "result.use" use "option.use" use "fmt.use" pkg std = generic try : (v : result(@a, @b) -> @a) generic val : (v : option(@a) -> @a) ;; generic try = {v match v | `Ok x: -> x | `Fail m: fatal("error: {}\n", m) ;; } generic val = {v match v | `Some x: -> x | `None: fatal("error: option had `None\n") ;; }