You need to use s/and, not and. On Friday, November 18, 2016 at 10:13:50 AM UTC-6, Mamun wrote: > > HI All > > Take an example in bellow > > (defn x-int? [x] > (cond > (integer? x) x > (string? x) (try > (Integer/parseInt x) > (catch Exception e > :clojure.spec/invalid)) > :else :clojure.spec/invalid)) > > > > (s/explain (and (s/conformer x-int?) (s/int-in 10 15)) "12") ;; Failed > (s/explain (and (s/conformer x-int?) (s/int-in 10 15)) 11 ) ;; Passed > > In here, explain does not work because of and. Is there any way to pass > conform value to next spec? > > Br, > Mamun >
-- 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. For more options, visit https://groups.google.com/d/optout.