title: Help me write a Clojure macro which automatically adds metadata to a function definition
body: <p>I realize that the first rule of Macro Club is Don't Use Macros, so the following question is intended more as an exercise in learning Clojure than anything else (I realize this isn't necessarily the best <em>use</em> of macros).</p>
  
  <p>I want to write a simple macro which acts as a wrapper around a regular <code>(defn)</code> macro and winds up adding some metadata to the defined function.  So I'd like to have something like this:</p>
  
  <pre><code>(defn-plus f [x] (inc x))
  </code></pre>
  
  <p>...expand out to something like this:</p>
  
  <pre><code>(defn #^{:special-metadata :fixed-value} f [x] (inc x))
  </code></pre>
  
  <p>In principle this doesn't seem that hard to me, but I'm having trouble nailing down the specifics of getting the <code>[args]</code> and other forms in the defined function to be parsed out correctly.</p>
  
  <p>As a bonus, if possible I'd like the macro to be able to handle all of the disparate forms of defn (ie, with or without docstrings, multiple arity definitions, etc).  I saw some things in the <a href="http://code.google.com/p/clojure-contrib/wiki/DefApiDoc" rel="noreferrer"><code>clojure-contrib/def</code></a> package that looked possibly helpful, but it was difficult to find sample code which used them.</p>