Fork me on GitHub
#clojure-spec
<
2019-08-05
>
akond05:08:41

explain-data produces a list of problems, but i've only seen a single item in it. can somebody show a case when the :problems vector contains more than one item?

Alex Miller (Clojure team)12:08:46

(s/explain-data (s/or :i int? :k keyword?) "abc")

akond12:08:47

but is it still possible to produce more then 1 problem without s/or's?

Alex Miller (Clojure team)12:08:48

yes, there are several places where it can happen