Created
August 22, 2017 18:21
-
-
Save anonymous/a60c40e84d4995f400dab0122432eabe to your computer and use it in GitHub Desktop.
show conform bug in spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(s/def ::test | |
(s/+ (s/alt :a #{\a} | |
:b (s/+ (complement #{\a}))))) | |
(s/conform ::test (vec "aba")) | |
#_> [[:a \a] [:b [\b]] [:a \a]] ; this seems fine | |
(s/conform ::test (vec "abba")) | |
#_> [[:a \a] [[:b [\b \b]] [:a \a]]] ; here it seems already weird that :b is double-wrapped | |
(s/conform ::test (vec "aabba")) | |
#_> [[:a \a] [[:a \a] [:b [\b \b]] [:a \a]]] ; this can't be right |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment