Hi Justin, Use apply:
(send-off (next-agent) (fn [v & args] (apply somefn args)) arg1 arg2 arg3) Cheers, Stuart > Is there a way to have args expanded to the actual arguments, not an > ArraySeq? I need the actual args to pass to a multimethod so it > knows how to dispatch appropriately. > > Code similar to this > > (send-off (next-agent) (fn [v & args] (somefn args)) arg1 arg2 arg3) > > Give me an error like this. > > ... > Caused by: java.lang.IllegalArgumentException: No method for > dispatch value: (clojure.lang.ArraySeq) > ... > > I could do this (below), but thought there might be a macro or > something I'm not aware of to make this cleaner. > > (send-off (next-agent) (fn [v & args] (somefn (nth args 0) (nth args > 1) (nth args 2))) arg1 arg2 arg3) > > Thanks, > Justin > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---