shithub: mc

ref: 9fa7e376e33410e78fda13897bf8e0914f201ddf
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")
	;;
}