Given a function object or name, how can I determine its arity? Something like (arity func-name) .
(arity func-name)
I hope there is a way, since arity is pretty central in C
The arity of a function is stored in the metadata of the var.
(:arglists (meta #'str)) ;([] [x] [x & ys])
This requires that the function was either defined using defn, or the :arglists metadata supplied explicitly.
defn
:arglists