shithub: mc

ref: 6b1a6216b40b804dd9c91c2bd54bee954776acaa
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 in a
		match v
		| `A:	std.put("A ")
		| `B:	std.put("B ")
		| `C x:	std.put("C %i\n", x)
		;;
	;;
	std.put("\n")
}