shithub: mc

ref: e14ba0f6333d6387951930db6618c97300aacb1e
dir: /test/stdopt-mk.myr/

View raw version
use std

const f = {x
	if x == 123
		-> `std.Some 42
	else
		-> `std.None
	;;
}

const main = {
	var v
	
	v = f(123)
	match v
	| `std.Some x:	std.exit(x)
	| `std.None:	std.exit(123)
	;;
}