cum-sum ( seq -- seq' )
Statistics ยป Computing cumulative sequences

Next:cum-sum0 ( seq -- seq' )


Vocabulary
math.statistics

Inputs
seqa sequence


Outputs
seq'a sequence


Word description
Returns the cumulative sum of seq.

Examples
USING: math.statistics prettyprint ; { 1 -1 2 -1 4 } cum-sum .
{ 1 0 2 1 5 }


Definition