Re: s/valid returns false, but s/explain prints "Success!"

2019-09-26 Thread Alex Miller
> On Sep 26, 2019, at 7:15 PM, Markus Agwin wrote: > > https://www.clojure.org/guides/spec are the docs I mentioned (search for > first occurrence of :kind) Thanks, that’s just old, will fix. > -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: s/valid returns false, but s/explain prints "Success!"

2019-09-26 Thread Markus Agwin
https://www.clojure.org/guides/spec are the docs I mentioned (search for first occurrence of :kind) Thank you very much! I have foolishly only checked for s/explains's "Success!" string, having omitted the s/valid? check to save runtime. On Thursday, September 26, 2019 at 2:54:03 PM UTC+2, Alex

Re: s/valid returns false, but s/explain prints "Success!"

2019-09-26 Thread Alex Miller
On Thursday, September 26, 2019 at 7:41:20 AM UTC-5, Markus Agwin wrote: > > Consider the following cloure.spec-alpha2 example: > > (def v [0]) > (s/def ::thevec vector?) > (s/def ::data (s/coll-of number? :kind ::thevec)) > :kind is expected to be a predicate, not a spec. The doc string (in

s/valid returns false, but s/explain prints "Success!"

2019-09-26 Thread Markus Agwin
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/va