shithub: mc

ref: 905f4d10a78e7e2f6eb849cf373b14cd78c87d73
dir: /test/uconinit.myr/

View raw version
use std

type u = union
	`A
	`B
	`C int
;;

const a = [`A, `B, `C 123]

const main = {
	for v : a
		match v
		| `A:	std.put("A ")
		| `B:	std.put("B ")
		| `C x:	std.put("C {}\n", x)
		;;
	;;
	std.put("\n")
}