minimum ( seq -- elt )
Factor handbook » The language » Collections » Sequence operations » Sequence combinators

Prev:count ( ... seq quot: ( ... elt -- ... ? ) -- ... n )
Next:minimum-by ( ... seq quot: ( ... elt -- ... x ) -- ... elt )


Vocabulary
sequences

Inputs
seqa sequence


Outputs
eltan object


Word description
Outputs the least element of seq.

Examples
Example:
USING: sequences prettyprint ; { 1 2 3 4 5 } minimum .
1

Example:
USING: sequences prettyprint ; { "c" "b" "a" } minimum .
"a"


Errors
Throws an error if the sequence is empty.

See also
min, max, minimum-by, maximum, maximum-by

Definition


Methods