Re: Use of s/keys with 'and' , 'or'

2017-06-22 Thread Alex Miller
On Thursday, June 22, 2017 at 5:17:33 AM UTC-5, Peter Hull wrote: > > On Wednesday, 21 June 2017 16:30:33 UTC+1, Alex Miller wrote: >> >> Yes, that's actually something that we have a pending patch to correct at >> https://dev.clojure.org/jira/browse/CLJ-2046 >> > That's interesting. Is there an

Re: Use of s/keys with 'and' , 'or'

2017-06-22 Thread Peter Hull
On Thursday, 22 June 2017 11:17:33 UTC+1, Peter Hull wrote: > > That's interesting. Is there anything I can help with to get that patch > accepted? I couldn't get it to apply to the current code in > https://github.com/clojure/spec.alpha because the filenames have changed, > but I copied across

Re: Use of s/keys with 'and' , 'or'

2017-06-22 Thread Peter Hull
On Wednesday, 21 June 2017 16:30:33 UTC+1, Alex Miller wrote: > > Yes, that's actually something that we have a pending patch to correct at > https://dev.clojure.org/jira/browse/CLJ-2046 > That's interesting. Is there anything I can help with to get that patch accepted? I couldn't get it to apply

Re: Use of s/keys with 'and' , 'or'

2017-06-21 Thread Alex Miller
Yes, that's actually something that we have a pending patch to correct at https://dev.clojure.org/jira/browse/CLJ-2046 On Wednesday, June 21, 2017 at 10:04:11 AM UTC-5, Peter Hull wrote: > > On Wednesday, 21 June 2017 14:33:02 UTC+1, Alex Miller wrote: >> >> This is correct. This is or, not xor.

Re: Use of s/keys with 'and' , 'or'

2017-06-21 Thread Peter Hull
On Wednesday, 21 June 2017 14:33:02 UTC+1, Alex Miller wrote: > > This is correct. This is or, not xor. Oops. OK. It's been one of those days. But, am I correct to say that gen/generate only ever makes values where all the 'or' alternatives are present? i.e. they always conform to: (s/keys :req

Use of s/keys with 'and' , 'or'

2017-06-21 Thread Alex Miller
This is correct. This is or, not xor. -- 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 unsubscrib

Use of s/keys with 'and' , 'or'

2017-06-21 Thread Peter Hull
According to the docs it's possible to use 'and' and 'or' for the required keywords. The example given is: (s/keys :req [::x ::y (or ::secret (and ::user ::pwd))] :opt [::z]) I assume this means the conf