shithub: mc

ref: cc61b84219f29c4bf874e579986ef77bcc6a0ad3
dir: /test/trait.myr/

View raw version
use std

trait frobable @a =
	frob	: (val : @a -> @a)
;;

impl frobable int =
	frob = {val
		-> val * 2
	}
;;

generic foo = {x : @a::frobable
	-> frob(x)
}

const main = {
	std.exit(foo(12))
}