shithub: mc

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