shithub: mc

ref: 16f5afe322e39f1716716700188664305b829d59
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)
	;;
}