Hi Gordon,
I ran into this earlier too. It's because s/def is a macro and needs access
to [::foo ::bar] at compile time, whereas 'ks' is only def'd at runtime. At
least that's how I understand it!
Cheers,
On Monday, 30 May 2016 05:14:18 UTC+10, Gordon Stratton wrote:
>
> Hi all,
>
> clojure.
Hi all,
clojure.spec/keys is documented to accept vectors for :req, :req-un,
etc. Shouldn't that also work if such a vector is previously bound?
Clojure 1.9.0-alpha3
user=> (require '[clojure.spec :as s])
nil
user=> (def ks [::foo ::bar])
#'user/ks
user=> (s/def ::foospec (s/keys :req