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