1

Is there any special form or function in Clojure which is an equivalent of:

(defn foo [ob col f] 
  (reduce 
     #(f %1 %2) 
     ob col))

Basically something like doto but working on Clojure data-structures not on mutable java objects.

1
  • As Leonid points out below, your function is just reduce with the arguments in a different order. Commented Jul 23, 2013 at 10:23

1 Answer 1

5

Your code looks fine, but it may be simplified to:

(reduce f ob coll)
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.