f...@helpshift.com writes: > I want to write a macro > > (defmacro params [] 'a 'b 'c) > > that will be used in places like this > > ;; without macro > (fnc a b c) > > ;; with macro > (fnc pararms) => (fnc a b c)
If you have a list of params, you can apply a function to it like so: (apply fnc params) e.g. (apply + [1 2 3]) ;=> 6 No macro needed. 'apply' is just another function. Does that help? -- 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 Note that posts from new members are moderated - please be patient with your first post. 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.