From 35677bc5fa4be3f5e9631f3694418a1fecb17c9e Mon Sep 17 00:00:00 2001 From: John Benediktsson <mrjbq7@gmail.com> Date: Wed, 26 Sep 2012 15:20:18 -0700 Subject: [PATCH] math.extras: remove variable effects from cum-reduce for now. --- extra/math/extras/extras.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/math/extras/extras.factor b/extra/math/extras/extras.factor index bdc92c300b..9ba914930f 100644 --- a/extra/math/extras/extras.factor +++ b/extra/math/extras/extras.factor @@ -155,7 +155,7 @@ PRIVATE> : until-zero ( n quot -- ) [ dup zero? ] swap until drop ; inline -: cum-reduce ( ... seq identity quot: ( ... prev elt -- ... next ) -- ... result cum-result ) +: cum-reduce ( seq identity quot: ( prev elt -- next ) -- result cum-result ) [ dup rot ] dip dup '[ _ curry dip dupd @ ] each ; inline <PRIVATE