[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
命名空间化?