title: How to get the corresponding var of a function parameter in Clojure?
body: <p>Consider the following Clojure REPL commands:</p>
  
  <pre><code>user=&gt; (defn foobar [x] (println x))
  #'user/foobar
  user=&gt; (defn somefun [] )
  #'user/somefun
  user=&gt; (foobar somefun)
  #object[user$somefun 0x4efeab94 user$somefun@4efeab94]
  nil
  user=&gt; (foobar (var somefun))
  #'user/somefun
  nil
  </code></pre>
  
  <p>Question: how can I achieve that <code>foobar</code> prints the <code>var</code>-form of its parameter?</p>
  
  <p>This does not work:</p>
  
  <pre><code>(defn foobar [x] (println (var x)))
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>CompilerException java.lang.RuntimeException: Unable to resolve var: x in this context, compiling:(/tmp/form-init882462612882384638.clj:1:27) 
  </code></pre>
  
  <p>It does not work with <code>(defn foobar [x] (println #'x))</code> either (same result).</p>