shithub: mc

ref: c827bfd2eb941cfdccf9cb2a1b6e50c24af5049e
dir: /test/cstr-builtin.myr/

View raw version
generic max = {a:@a::tcnum, b:@a::tcnum
	if a > b
		-> a
	else
		-> b
	;;
}

generic intlike_is42 = {a : @a::(tcnum,tctest,tcint)
	-> a == 42
}
const main = {
	if intlike_is42(123)
	    -> 16
	else
	    -> max(12, 42)
	;;
}