macro | removed v1.9.542 | added v1.9.14 | Edit |
(tuple & preds)
takes one or more preds and returns a spec for a tuple, a vector where each element conforms to the corresponding pred. Each element will be referred to in paths using its ordinal.
(defmacro tuple
[& preds]
(clojure.core/assert (not (empty? preds)))
`(tuple-impl '~(mapv #(res &env %) preds) ~(vec preds)))