On Wed, Jul 27, 2011 at 2:15 PM, Ken Wesson <kwess...@gmail.com> wrote:

> On Wed, Jul 27, 2011 at 2:13 PM, Alan Malloy <a...@malloys.org> wrote:
> > On Jul 27, 11:11 am, Alan Malloy <a...@malloys.org> wrote:
> >> On Jul 27, 5:50 am, Feng Shen <shen...@gmail.com> wrote:
> >>
>
> (defn foldr
>  ([f coll]
>    (reduce f (reverse coll)))
>  ([f init coll]
>    (reduce f init (reverse coll))))
>
> There. :)


I may be wrong, but don't you need to swap the order of the arguments to f?

-- 
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

Reply via email to