You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am trying to understand the behaviour of the option element in the FancySeq example on the Readme page.
The following throws a validation error:
(s/validate FancySeq ["test" 1 2 3])
Why is this so? I think it should validate fine, since they keyword is optional.
Is this a bug, or do I fail to understand the notion of optionality?
Thanks
Jens
The text was updated successfully, but these errors were encountered:
Not a bug, the semantics is that if an optional element is not present, the
sequence must stop there. I.e. in regex it's like (o1 (o2 r_)?)? not o1?
o2? r_
We will try to clarify that in the readme, or if you want to take a crack
at it that would be even better :). Thanks!
Hello,
I am trying to understand the behaviour of the option element in the
FancySeq example on the Readme page.
The following throws a validation error:
(s/validate FancySeq ["test" 1 2 3])
Why is this so? I think it should validate fine, since they keyword is
optional.
Is this a bug, or do I fail to understand the notion of optionality?
Thanks
Jens
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub #348
Hello,
I am trying to understand the behaviour of the option element in the
FancySeq
example on the Readme page.The following throws a validation error:
(s/validate FancySeq ["test" 1 2 3])
Why is this so? I think it should validate fine, since they keyword is optional.
Is this a bug, or do I fail to understand the notion of optionality?
Thanks
Jens
The text was updated successfully, but these errors were encountered: