I am a macro newbie... I want to create a macro that calls a function with a given name and a parameter list on a given object. My first idea was like this:
(defmacro call "Calls an instance method on a given object with a list of params." [obj method-name params] `(. ~obj ~(symbol method-name) ~...@params)) It works fine, if the param list is a simple list, like "(1 2 3 4)", but if params is created from an existing list, like "(rest alist)" then it doesn't work. So params has to be evaluated first and then the single params has to be expanded. How do I do that? I tried it with a let block then I got other errors. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
