On Tuesday, 17 September 2019 22:34:04 UTC+1, Daniel Dinnyes wrote: > > (let [x 42] :clojure.spec.alpha/invalid) > > That's an interesting one. It's failing the spec on the let's body, which is just 'any?' , so this is initially surprising. However s/valid? is implemented as, approximately, (not (invalid? (conform spec value))) and (conform any? value) evaluates to value (invalid? v) is implemented as (identical? ::invalid v) so (valid? any? ::invalid) (not (invalid? (conform any? ::invalid))) (not (identical? ::invalid (conform any? ::invalid))) (not (identical? ::invalid ::invalid)) (not true) false
Whether this is a bug or not I can't say - it seems to be an inevitable consequence of the way spec is implemented. Pete -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/48c0feca-9169-49e5-887c-8f4590985f43%40googlegroups.com.