~ clj
Clojure 1.9.0
user=> (require '[clojure.spec.alpha :as s])
nil
user=> (require '[clojure.core.specs.alpha])
nil
(let [spec (:args (s/get-spec `defn))
form `(~'foo ([~'a] 1) [~'a ~'b])]
{:valid (s/valid?
spec
form)
:explain-data (s/explain-data
spec
form)})
{:valid false, :explain-data nil}
user=>
Expected: If form is invalid, explain-data should not be nil