minmax ( seq -- min max )
Statistics

Prev:range ( seq -- x )
Next:kth-smallest ( seq k -- elt )


Vocabulary
math.statistics

Inputs
seqa sequence


Outputs
mina real
maxa real


Word description
Finds the minimum and maximum elements of seq in one pass. Throws an error on an empty sequence.

Examples
USING: arrays math.statistics prettyprint ; { 1 2 3 } minmax 2array .
{ 1 3 }


Definition