On Sun, Oct 16, 2016 at 11:40 PM, Ikuru Kanuma wrote:
> Mauricio, thanks for the response!
> I agree that that gets what I asked for done, but that solution is in
> essence writing the same
> qualified/unqualified version of the spec twice and sounded redundant,
> which lead to my question.
> I g
Mauricio, thanks for the response!
I agree that that gets what I asked for done, but that solution is in
essence writing the same
qualified/unqualified version of the spec twice and sounded redundant,
which lead to my question.
I guess it is what it is in that case...
Leon, thanks for the respo
They are not exclusive
(s/def ::baz (skeys :req [::foo] :req-un [::bar]))
works.
On Friday, October 14, 2016 at 7:07:39 AM UTC+2, Ikuru Kanuma wrote:
>
> Hi,
>
> I was reading the official spec guide's explanation for the s/keys macro,
> played around with it a bit,
> and was a little surprised
Hi,
You can achieve that using *spec/or*:
(s/def ::map-with-numbers
(s/or :qualified ::map-with-numbers1
:unqualified ::map-with-numbers2))
(s/valid? ::map-with-numbers {::some-number 3}) => true
(s/valid? ::map-with-numbers {:some-number 3}) => true
Cheers,
Mauricio
--
You receive