Fork me on GitHub
#clojure-spec
<
2016-06-27
>
angusiguess17:06:09

::args should be an s/cat

angusiguess17:06:23

(s/fdef takes-a-map :args (s/cat :a ::A)))

angusiguess17:06:51

Args is always assumed to be a list of 0 or more arguments

angusiguess17:06:14

Or rather, a spec for a list of 0 or more arguments

bhauman22:06:28

So I'd like to do some spec work in an environment that needs to run on an earlier version of Clojure. I'd like to conditionally include the clojure.spec library if the Clojure version isn't 1.9 and if clojure.spec isn't already loaded. Is there an established smart pattern for doing this? Say requiring a library that does a conditional load?

seancorfield23:06:19

I don’t know how "established" it is, but I did this for java.jdbc’s test namespace...

bhauman23:06:59

@seancorfield: thanks! I appreciate it. I'll take a gander :)