-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi,
Thanks a lot for this library!
I have defined the following spec:
(s/def ::colors (s/coll-of string? :kind vector? :min-count 1))
And the following phrasers:
(phrase/defphraser :default
[_ problem]
problem)
(phrase/defphraser #(clojure.core/<= min-count (clojure.core/count %) max-count)
[_ {:keys [val]} min-count max-count]
(str min-count))
When running phrase-first
with the following input:
(phrase/phrase-first {} ::colors [])
I expect the 2nd phraser to be matched, but actually the default phraser is matched:
{:path [],
:pred (clojure.core/<= 1 (clojure.core/count %) Integer/MAX_VALUE),
:val [],
:via [:my-project.schema/colors],
:in [],
:phrase.alpha/mappings {:x0 1},
:phrase.alpha/via ()}
Any ideas what am I missing?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels