Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
即,类似:
(defn dowith [f & arglists] (doseq [args arglists] (apply f args)))
Clojure 中是否有类似的内置函数?
我经常写这样的东西;它太短了,不值得包装:
(map #(apply myfun %) list-of-arglists)
我map最常使用,所以我得到结果并保持懒惰。当然,如果您不想让它变得懒惰并且不想要结果,那么doseq也可以。
map
doseq
不,没有内置函数可以做到这一点。