shithub: mc

ref: 8fef0e65ac05920b30d13ef4816dd166c3c83c47
dir: /libstd/try.myr/

View raw version
use "option.use"
use "fmt.use"

pkg std =
	generic try : (v : option(@a) -> @a)
;;

generic try = {v
	match v
	| `Some x:	-> x
	| `None:	fatal("expected `Some @a, got `None\n")
	;;
}