cljs.spec/coll-checker

functionremoved v1.9.183added v1.9.14Edit
(coll-checker pred)

Source docstring:
returns a predicate function that checks *coll-check-limit* items in a collection with pred
Source code @ clojurescript:src/main/cljs/cljs/spec.cljs
(defn coll-checker
  [pred]
  (let [check? #(valid? pred %)]
    (fn [coll]
      (c/or (nil? coll)
            (c/and
              (coll? coll)
              (every? check? (take *coll-check-limit* coll)))))))