macro | previously cljs.spec/and | clojure.spec.alpha/and | Edit |
(and & pred-forms)
Takes predicate/spec-forms, e.g. (s/and even? #(< % 42)) Returns a spec that returns the conformed value. Successive conformed values propagate through rest of predicates.
(defmacro and
[& pred-forms]
`(and-spec-impl '~(mapv #(res &env %) pred-forms) ~(vec pred-forms) nil))