Consider the following cloure.spec-alpha2 example:
(def v [0])
(s/def ::thevec vector?)
(s/def ::data (s/coll-of number? :kind ::thevec))
(s/valid? ::data v) ;;=> returns false, my expectation is that it should return true
(s/explain ::data v) ;;=> prints "Success!", which inconsistent to s/valid?
(s/def ::data2 (s/coll-of number? :kind vector?))
(s/valid? ::data2 v) ;;=> returns true, as expected
I expect (s/valid? ::data v) to return true, but it returns false. Moreover, s/explain prints "Success!" which is inconsistent to s/valid? for this example.
If I replace :kind ::thevec by :kind vector?, everything is fine. Why is that (the spec documentation says: ":kind - a predicate or spec").