summaryrefslogtreecommitdiff
path: root/libstd/extremum.myr
blob: 5d63acd3c320a1a348cf9c6d58685871652200e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pkg std =
	generic min	: (a : @a::tcnum, b : @a::tcnum  -> @a::tcnum)
	generic max	: (a : @a::tcnum, b : @a::tcnum  -> @a::tcnum)
;;

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

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