title: In clojure, how can I evaluate the arguments to a macro from another macro?
body: <p>I have two macros. The first one takes a symbol as the only parameter (because it's passed to def, which needs a symbol). The second function takes a list of symbols and should call the first with each symbol individually. </p>
  
  <pre><code>(defmacro m1 [s]
    '(let [f# ... dynamic function definition ...]
        (def ~s f#))
  </code></pre>
  
  <p>The second macro should take a list of symbols and pass them to the first, but I can't get it to work. The best I could come up with was the following:</p>
  
  <pre><code>(defmacro m2 [symbols]
     `(for [s# ~symbols] (eval (read-string (str "(name.of.current.namespace/m1 " s# ")")))))
  </code></pre>
  
  <p>which forces the <code>s#</code> to be evaluated before it is passed to the first macro. It is also invoked with a list of strings, rather than a list of symbols.</p>
  
  <p>This is useful for a library which I am using for which all of the functions in the library takes the same two first parameters. I am trying to create wrapper functions, in my namespace, for some of the functions, which automatically provides the first two parameter values which are common to all of them.</p>
  
  <p>Any ideas to improve this?</p>