specter

Latest version: 1.1.3
akond 2020-02-05T06:58:22.026600Z

(let [data {:data {:a [1 2 3] :b [{:foo :bar}]}}]
 (is (= (s/transform (s/walker (every-pred vector? (fn-> count (= 1)) )) first data)
      {:data {:a [1 2 3] :b {:foo :bar}}})))

2👍
richiardiandrea 2020-02-09T05:17:49.030Z

thanks a lot for answering!

steveb8n 2020-02-05T22:39:25.029200Z

@akond thanks, I learned from that example too. a couple of questions: 1/ which lib does fn-> come from? 2/ the docs for walker imply it stops navigation when the predicate is satisfied once but, when I add another match, it transforms that too. this is what I want but it seems to contradict the docstring. what am I missing?