title: Dynamic code with clojure
body: <p>I'm trying to create some dynamic code within clojure.  In the function below, the idea is that the conditions for the (and) macro will be dynamically generated.</p>
  
  <pre><code>(defn matching-keys [rec match-feed keys]
    (&gt; (count (clojure.set/select #(and (for [k keys]
                                          (= (% k) (rec k))))
                                  (set match-feed)))
       0))
  </code></pre>
  
  <p>So if it worked!! then this code would produce an (and) something like this when passed keys of <code>[:tag :attrs]</code>:</p>
  
  <pre><code>(and (= (% :tag) (rec :tag))
       (= (% :attrs) (rec :attrs)))
  </code></pre>
  
  <p>I've been messing around with various <code>`` and</code>~` operators to try to make it work, and am now in a state of confusion.  Any guidance is welcome.</p>
  
  <p>Thanks,</p>
  
  <p>Colin</p>