title: Using variadic macro arguments as a list
body: <p>I was trying to write a macro that compares the running times of multiple expressions, and ran into a wall. My problem can be condensed to the following code:</p>
  
  <pre><code>(defmacro test-m [&amp; exprs]
    `(map #(.toString %) ~exprs))
  </code></pre>
  
  <p>If I call this like <code>(test-m 1 2 3)</code>, I would expect this to produce code along the lines of:</p>
  
  <pre><code>(map #(.toString %) [1 2 3])
  </code></pre>
  
  <p>Which is entirely valid. Unfortunately though, this actually results in an error:</p>
  
  <blockquote>
    <p>ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn  helpers.general-helpers/eval663 (NO_SOURCE_FILE:76)</p>
  </blockquote>
  
  <p>The only way I could see this possibly happening is if <code>&amp; exprs</code> results in <code>(1 2 3)</code>, which would then attempt to call <code>1</code> as a function, which is obviously wrong.</p>
  
  <p>How can I map over a variadic argument list in a macro?</p>