As an exercise, I've started implementing the various map functions from the CL HyperSpec and ran into a bit of a roadblock their variadic nature.
I know certain functions like the arithmetic operators and ++ are (seem?) variadic, so I'm wondering how I can write my own.
I was toying around with a macro that expands to the appropriate defuns with arities up to 20 à la Clojure, but that proved nontrivial to me and doesn't seem like the best approach overall anyway.
So, what's the preferred way to write variadic functions in LFE?
Related question: Given a defined function, is there a way to get its arity?
As in:
(defun f (x y) (+ x y))
(... f) ; <= 2
Cheers,
Eric