shithub: mc

ref: 4da95e96e01dac40ff290b1e2cb4e9f641aea398
dir: /test/gtrait.myr/

View raw version
use std

trait comparable @a =
	cmp	: (a : @a, b : @a -> std.order)
;;

impl comparable @a :: numeric @a =
	cmp = {a, b
		-> std.numcmp(a, b)
	}
;;

const main = {
	std.put("{}", cmp(1, 2))
}