Given this example:
(defn foo [a & [b c :as args]](prn args))
Is there any way I can add a fourth, optional argument after b and c?
I've tried this and a few other variations with no success (CompilerException java.lang.RuntimeException: Unexpected parameter):
(defn foo [a & [b c :as args d]](prn d))
..another example (CompilerException java.lang.RuntimeException: Unable to resolve symbol: d in this context)
(defn foo [a & [b c :as args & d]](prn d))
Am I hosed after :as args if I want to add more arguments?
EDIT: This was suggested in IRC, and it works, I just wonder if there's a syntactically simpler way...
(defn foo [a & rst] (let [[b c & d] rst args [b c]] {:a a :b b c :args args :rst rst}))