I have a function with an argument list [a & b]. What is the spec for this? I've tried various things, but the clojure-spec documentation is sparse to the point of unhelpfulness and most of the questions in this channel seem to be dealing with more complex situations than I have. If there's a good tutorial around, that might help me, too.
:args (s/cat :a ... :b (s/* ...)) I think...
For example:
(s/fdef jdbc/with-transaction
:args (s/cat :binding (s/and vector?
(s/cat :sym simple-symbol?
:transactable ::transactable
:opts (s/? any?)))
:body (s/* any?)))
for
(defmacro with-transaction
"..."
[[sym transactable opts] & body]
(let [con (vary-meta sym assoc :tag 'java.sql.Connection)]
`(transact ~transactable (^{:once true} fn* [~con] ~@body) ~(or opts {}))))Thank you, Sean