macro | removed v1.9.542 | added v1.9.85 | Edit |
(every-kv kpred vpred & opts)
like 'every' but takes separate key and val preds and works on associative collections. Same options as 'every', :into defaults to {} See also - map-of
(defmacro every-kv
[kpred vpred & opts]
(let [desc `(every-kv ~(res &env kpred) ~(res &env vpred) ~@(res-kind &env opts))]
`(every (tuple ~kpred ~vpred) ::kfn (fn [i# v#] (nth v# 0)) :into {} ::describe '~desc ~@opts)))