shithub: mc

ref: 3250653e1a127a7052b775ad8508dcd3adaf3ee5
dir: /test/matchbind.myr/

View raw version
type u = union
	`Int int
	`Chr char
	`Nil
;;

const main = {
	var v

	v = `Int 11
	match v
	`Int 127:
		-> 42
		;;
	`Int x:
		-> x
		;;
	`Chr 'a':
		-> 4
		;;
	`Nil:
		-> 6
		;;
	;;
}