title: Clojure - treat list elements as function parameters
body: <p>I'm trying to do something similar to Python's <code>func(*lst)</code> but with Clojure, and without using the <code>apply</code> function. My admittedly silly use case is:</p>
  
  <pre><code>{:k1 v1 (cond exp '(:k2 v2) :else '(:k3 v3))}
  </code></pre>
  
  <p>So if exp was true, the dict would contain <code>{:k1 v1 :k2 v2}</code>, otherwise <code>{:k1 v1 :k3 v3}</code>. I basically want a Python-esque <code>*</code> applied to the return value of <code>cond</code>. I tried playing around with data/code modes with ', `, and ~, though didn't find a solution. I can repeat the <code>cond</code> for the individual parameters to the underlying <code>hash-map</code> but that kind of defeats the point.</p>
  
  <p>Why? I just think it'd be cool if Clojure can do it easily. :)</p>