shithub: mc

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