shithub: mc

ref: 4c168baca830ab272ab88c41e07fecf4b98fe79b
dir: /libstd/extremum.myr/

View raw version
pkg std =
	generic min	: (a : @a::numeric, b : @a::numeric  -> @a::numeric)
	generic max	: (a : @a::numeric, b : @a::numeric  -> @a::numeric)
;;

generic min = {a, b
	if a < b
		-> a
	else
		-> b
	;;
}

generic max = {a, b
	if a > b
		-> a
	else
		-> b
	;;
}