shithub: mc

ref: 224a25f16463b31a8f36f266d34d09e83175f170
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))
}