我有这个 Clojure 代码:
(defn apply-all-to-arg [& s]
(let [arg (first s)
exprs (rest s)]
(for [condition exprs] (condition arg))))
(defn true-to-all? [& s]
(every? true? (apply-all-to-arg s)))
这是测试代码:
(apply-all-to-arg 2 integer? odd? even?)
=>(真假真)
(every? true? (apply-all-to-arg 2 integer? odd? even?)
=> 假的
(true-to-all? 2 integer? odd? even?)
=> 真
我的问题是:为什么该功能是真实的?返回 true (它必须返回 false 代替)