Handbook
Glossary
cum-min ( seq -- seq' )
Statistics
ยป
Computing cumulative sequences
Prev:
cum-product1 ( seq -- seq' )
Next:
cum-max ( seq -- seq' )
Vocabulary
math
.
statistics
Inputs
seq
a
sequence
Outputs
seq'
a
sequence
Word description
Returns the cumulative min of
seq
.
Examples
USING: math.statistics prettyprint ; { 5 3 4 1 } cum-min .
{ 5 3 3 1 }
Definition
USING:
kernel
math.order
sequences
;
IN:
math.statistics
:
cum-min
( seq -- seq' )
dup
?first
[
min
]
accumulate*
;