Fork me on GitHub
#clojure-spec
<
2019-08-23
>
johanatan20:08:22

is there a way to ask spec: "give me all embedded values in the nested map satisfying spec ::x?" (either in the std alpha or in 3rd party extensions). I'm thinking it wouldn't be too hard to do this with specter + spec but just wondered if something like it already exists...

alexmiller20:08:40

but it's just something like (defn deep-match [s x] (->> x (tree-seq coll? seq) (filter #(s/valid? s %))))

johanatan20:08:51

🙂 yea. cool, thx