title: How can I parameterize access to a Java enum in clojure?
body: <p>Say I have a Java enum. For example:</p>
  
  <pre><code>public enum Suits {CLUBS, DIAMONDS, HEARTS, SPADES};
  </code></pre>
  
  <p>Normally, I can do something in clojure with that enum like so:</p>
  
  <pre><code>(defn do-something []
     (let [s Suits/DIAMONDS] (...)))
  </code></pre>
  
  <p>But, I want to write a clojure function that allows the caller to specify which enum instance to use:</p>
  
  <pre><code>(defn do-something-parameterized [suit]
     (let [s  Suits/suit] (...)))
  </code></pre>
  
  <p>The idea is to let a caller pass in <code>"DIAMONDS"</code> and have the <code>DIAMONDS</code> enum instance get bound to <code>s</code> in the <code>let</code>. </p>
  
  <p>I could have a <code>cond</code> match against the parameter but that seems clunkier than necessary. I suppose I could also use a macro to construct <code>Suits/</code> added to <code>suit</code>. Is this the way to do it or is there a non-macro way that I'm missing?</p>