shithub: mc

ref: 4db5274a2f6db10e31e11c503f36c85a98c65fbc
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")
}