shithub: mc

ref: 4fb00e671f84192b77bbca4c095b5c5cdf755e31
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
	;;
}