I basically want this:
(defn mymax
([a b] (if (> a b) a b))
([a b & rest] (apply recur (conj rest (mymax a b)))))
So that: (mymax 1 2 3 4) tail calls (mymax 2 3 4) which tail calls (mymax 3 4)
I see the problem that "apply" stops recur being in the tail position, which means it won't work. But I don't see how I can not use apply for variable arguement functions
[Note, I know you can solve this particular problem with reduce. Just wondering if you can do tail-call-recursion with variable params]