One approach is to examine the function to find out how many arguments it takes. This link describes how to detect just that.
If you change this answer a bit, you will get the maximum number of arguments:
(defn n-args [f]
(-> f class .getDeclaredMethods last .getParameterTypes alength))
, , . ,
(defn n-args [f]
(apply max
(map
(-> f class .getDeclaredMethods))))
:
(defn anyargs [f]
(let [n (n-args f)]
(fn [& args] (apply f (take n args)))))
, , , , . , , , ArityExceptions , .