{{:pred}} 应该在如下的解释问题中(resolve)
{{s/coll-of}} 和 {{s/every-kv}} 如果其值无效应该(resolve)拥有 {{:pred}} 函数
(::s/problems (s/explain-data (s/coll-of (fn [x] (pos? x))) [-1]))
({:path [], :pred (fn [x] (pos? x)), :val -1, :via [], :in [0]})
应该是
(::s/problems (s/explain-data (s/coll-of (fn [x] (pos? x))) [-1]))
({:path [], :pred (clojure.core/fn [x] (clojure.core/pos? x)), :val -1, :via [], :in [0]})
其他示例
;; 与 every 相同
(::s/problems (s/explain-data (s/every (fn [x] (pos? x))) [-1]))
({:path [], :pred (fn [x] (pos? x)), :val -1, :via [], :in [0]})
;; :distinct 选项的 pred 未(resolve)
(::s/problems (s/explain-data (s/coll-of pos? :distinct true) [-1 -1]))
[{:path [], :pred distinct?, :val [-1 -1], :via [], :in []}]
map-of 和 every-kv 没有这个问题。:count, :min-count, :max-count 和 :kind 选项能正确生成(resolve)的 :preds。
*补丁:* clj-2168.patch