If that's the case, I can accept it. Thank you guys :) On Nov 8, 2:18 am, "[email protected]" <[email protected]> wrote: > On Sun, Nov 7, 2010 at 3:28 PM, [email protected] <[email protected]> wrote: > > 2010/11/7 David Sletten <[email protected]> > > >> Or for those of you who prefer that other people won't be able to read > >> your code: > >> (defn foldr [f coll] > >> (reduce #(f %2 %1) (reverse coll))) > > fold-right can not be made tail-recursive and in one-pass at the same time. > reverse and reduce is a good way to do it.
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
