title: datomic query - function that filters and binds
body: <p>I'd like to be able to do something like this:</p>
  
  <pre><code>(defn match? [m] (re-find (re-pattern "so (\\d+)") m))
  
  (datomic.api/q 
    '[:find ?m
      :where [[?e :user/regex-match ?r]
              [(user/match? ?e) ?m]] 
     dbconn)
  </code></pre>
  
  <p>This gives me what I expect, but it calls "match?" twice per entity:</p>
  
  <pre><code>(datomic.api/q 
    '[:find ?m
      :where [[?e :user/regex-match ?r]
              [(user/match? ?e) ?m]
              [(user/match? ?e)] 
     dbconn)
  </code></pre>