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


Vocabulary
math.extras

Inputs and outputs
seqan object
identityan object
quota quotation with stack effect ( prev elt -- next )
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