shithub: mc

ref: 57d353555aedbad8ad4f2bb022a58d6b01cb941b
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))
}