Reputation: 2993
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.
Upvotes: 1
Views: 80
Reputation: 51440
Your code looks fine, but it may be simplified to:
(reduce f ob coll)
Upvotes: 5