shithub: mc

ref: 4ff9f95d84eb12bbbb0895669cc888eea1867bf5
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
		;;
	;;
}