Yes, that use case (two different non-predicate schemas) is no longer supported. While superficially simple, it added a fair bit of complexity and had corner cases that are not present with `conditional` or `constrained`. Moreover, in our experience the primary use case for `both` by far was with a predicate, and in the other cases there is typically a reasonable alternative. Can you elaborate on what your use case looks like?
Thanks, Jason On Mon, Mar 7, 2016 at 11:41 AM, JvJ <kfjwhee...@gmail.com> wrote: > In this example, one of the schemas is a predicate schema. What if neither > of them are? > > > On Sunday, 6 March 2016 18:48:21 UTC-8, Jason Wolfe wrote: >> >> In place of (s/both long (s/pred odd?)) you can do (s/conditional odd? >> long), but (s/constrained long odd?) probably provides better error messages >> (since it validates long before odd?). I think there are some examples in >> the readme. >> >> If this isn't what you're looking for, can you please provide some more >> details of your use case? >> >> Thanks, >> Jason >> >> >> >> On Sunday, March 6, 2016 at 5:38:35 AM UTC+5:30, JvJ wrote: >>> >>> >>> I've noticed that there is the function "both" in Schema. >>> >>> Both says that it can be replaced by conditional, but I'm not sure >>> exactly how to go about doing this. >>> >>> Can someone provide an example? >>> >>> Thanks > > -- > 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 a topic in the > Google Groups "Clojure" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure/1Xfr_VS2yV4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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.