title: Custom equality in Clojure distinct
body: <p>In a Clojure program I've an array composed by maps containing peoples' names and emails.</p>
  
  <p>e.g. </p>
  
  <pre><code>[
      { :name "John" :email "john@gmail.com" }  
      { :name "Batman" :email "batman@gmail.com" }  
      { :name "John Doe" :email "john@gmail.com" }  
   ] 
  </code></pre>
  
  <p>I'd like to remove the duplicate entries considering, for comparison purposes, pairs having the same e-mail to be equals. In the example above the output would be:</p>
  
  <pre><code>[
      { :name "John" :email "john@gmail.com" }  
      { :name "Batman" :email "batman@gmail.com" }  
   ] 
  </code></pre>
  
  <p>What's the best way to achieve this in Clojure? Is there a way to let distinct knows what equals function to use?</p>
  
  <p>Thanks.</p>