Basic module

min

procedure2 overloadsSource

The smaller of a and b. Works on any type with <.

min :: (a: $T, b: T) -> T

Parameters

a: $T
b: T

Returns

T
Example↗
assert(min(3, 7) == 3);
assert(min(2.5, -1.0) == -1.0);
min :: (a: $T, x: ..T) -> T

The smallest of all the arguments. T must be a number, pointer or enum.

Parameters

a: $T
x: ..T

Returns

T
Example↗
assert(min(9, 4, 6, 8) == 4);

See also