Handbook
Glossary
cum-product ( seq -- seq' )
Statistics
ยป
Computing cumulative sequences
Prev:
cum-sum0 ( seq -- seq' )
Next:
cum-product1 ( seq -- seq' )
Vocabulary
math
.
statistics
Inputs
seq
a
sequence
Outputs
seq'
a
sequence
Word description
Returns the cumulative product of
seq
.
Examples
USING: math.statistics prettyprint ; { 2 3 4 } cum-product .
{ 2 6 24 }
Definition
USING:
math
sequences
;
IN:
math.statistics
:
cum-product
( seq -- seq' )
1
[
*
]
accumulate*
;