Hi all, I'm sorry such my frequent posts.
How stupid have I been! The function 'f' doesn't vary in the chain of operations. We only have to keep 1st operands of 'f' in reversed order in a list. What I have to do is applying 'f' in the reversing order when stopping condition comes, instead of reversing operands at the beggining of calculations and apply 'f's to them. I've updated, 1) The initial topic *fold-right* and its family *reduce-right:* https://gist.github.com/2893987 2) An abstraction for folding-from-right-loops *r-reduce:* https://gist.github.com/2896939 3) Related function *unfold*: https://gist.github.com/2901487 They no longer need a large heap. Regards, Yoshinori Kohyama -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en