Is there any guidance on how to do the fdef for a function with more than one arity? As an example, this one which takes one or two arguments:
(defn report
"Report an error code, optionally with a message"
([errno] ...)
([errno msg] ...))
Could be:
(s/fdef report
:args (s/alt :brief (s/cat :errno integer?)
:full (s/cat :errno integer? :msg string?)))
or:
(s/fdef report
:args (s/cat :errno integer? :msg (s/? string?)))
Some options make more sense than others, depending on the function. For example clojure.core/map is defined with five separate arities but I don't think it would be right to spec it as an alt with five alternatives, since they are all covered by "function followed by zero or more colls"
So, has a convention been established on how best to do it?