title: Clojure Keyword and Optional Argument Problem
body: <p>I want to create a function that takes in a required argument x, and either a optional argument opt1 OR a keyword argument opt2.</p>
  
  <p>Right now I have</p>
  
  <pre><code>(defn foo x &amp; [opt1 {:keys [opt2]}]
    ...
  </code></pre>
  
  <p>But the above signature only lets me pass in keyword argument opt2 when both x and opt1 is present like</p>
  
  <pre><code>(foo 'x 'opt1 {:opt2 'opt2})
  </code></pre>
  
  <p>not like this </p>
  
  <pre><code>(foo 'x {:opt2 'opt2})
  </code></pre>
  
  <p>Please help me create a function that takes a required argument X and either opt1 or opt2, where opt2 is a keyword argument.</p>
  
  <p>Thank you.</p>
  
  <p>EDIT: I want to do the same for other macros as well. So I still need to use the defmacro.</p>