NAME

min - minimum of two or more values

SYNOPSIS

res = a.min(b)
res = a.min(b, c, ...)

DESCRIPTION

Returns the minimum of its arguments.

If called with two arguments, min returns the smaller of a and b. If either a or b is an array, the operation is vectorized across the arrays.

If called with more than two arguments, min returns the minimum of all provided arguments.

For strings, min uses lexicographical order.

RETURN VALUE

Returns the minimum of the inputs.

ERRORS

ArgCheck: Thrown if fewer than 2 arguments are provided.
TypeCheck: Thrown if the arguments are not comparable.
ShapeCheck: Thrown if the arguments are arrays with incompatible shapes.

EXAMPLE

    10->min(20)
10

    1->min(2, 3, -1)
-1

    [1, 5, 3].min(2)
1 2 2

    "apple".min("banana")
"apple"

SEE ALSO

max
minval