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.
您的代码看起来不错,但可以简化为:
(reduce f ob coll)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.