Fork me on GitHub
#clojure-spec
<
2020-02-01
>
kenny22:02:55

Should spec2's s/select work for collections of collections? I would think this would return false.

(s2/def ::coll-next (s2/coll-of (s2/coll-of (s2/schema [::a]))))
(s2/def ::map (s2/schema [::coll-next]))
(s2/valid?
    (s2/select ::map [::coll-next {::coll-next [::a]}])
    {::coll-next [[]]})
=> true

seancorfield23:02:19

Given that ::coll-next is a collection, not a schema, I'm not sure how that should work...?