cum-reduce ( seq identity quot: ( prev elt -- next ) -- result cum-result )


Vocabulary
math.extras

Inputs
seqan object
identityan object
quota quotation with stack effect ( prev elt -- next )


Outputs
resultan object
cum-resultan object


Definition


: cum-reduce
( seq identity quot: ( prev elt -- next ) -- result cum-result )
[ dup rot ] dip dup [ [ curry dip dupd ] curry ] dip compose
each ; inline