‘and' and ‘or’ are not currently supported in :opt
> On May 24, 2016, at 1:45 PM, scott stackelhouse > <[email protected]> wrote: > > I'm having a problem writing a spec for a map with some required keywords and > some optional keywords. The caveat here is that the optional keywords are > all or none... that is they are optional but if one is present they must all > be present. > > What I tried to write was: > > (s/keys :req [::a ::b ::c] :opt [(and ::d ::e ::f)]) > > and that fails an assertion. It appears that the logicals (and, or) are not > allowed in the optional section? > > Am I thinking about this in the wrong way? > > --Scott > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > 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 [email protected]. > 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 [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
