[org.clojure/clojure "1.11.0-alpha2"]
clojure.spec.alpha
重现(查看 keys
内部的 or
)
(s/def :x/foo int?)
(s/def :x/bar string?)
(s/form (s/keys :req-un [(or :x/foo :x/bar)]))
; => (clojure.spec.alpha/keys :req-un [(or :x/foo :x/bar)])
(s/form (s/and (s/keys :req-un [(or :x/foo :x/bar)])))
;=> (clojure.spec.alpha/and (clojure.spec.alpha/keys :req-un [(clojure.core/or :x/foo :x/bar)]))
有没有办法强制在第一个 form
中将 or
命名空间化?