title: Clojure: How to get meta-data of functions?
body: <p>I am trying to get meta-data of all built-in Clojure functions.</p>
  
  <p>In <a href="https://stackoverflow.com/questions/1696693/clojure-how-to-find-out-the-arity-of-function-at-runtime">previous question</a> I've learned that this can be achieved using something like <code>^#'func_name</code> (get the var object's meta data).  But I didn't manage to do it programmatically, where func-name is not known in advance.</p>
  
  <p>For example trying to get the metadata of the last function in clojure.core:</p>
  
  <pre><code>user=&gt; (use 'clojure.contrib.ns-utils)
  nil
  user=&gt; (def last-func (last (vars clojure.core)))
  
  user=&gt; last-func
  zipmap
  
  ;The real metadata (zipmap is hardcoded)
  user=&gt; ^#'zipmap
  {:ns #&lt;Namespace clojure.core&gt;, :name zipmap, :file "clojure/core.clj", :line 1661, :arglists ([keys vals]), :doc "Returns a map .."}
  
  ;Try to get programmatically, but get shit
  user=&gt; ^#'last-func
  {:ns #&lt;Namespace user&gt;, :name last-func, :file "NO_SOURCE_PATH", :line 282}
  </code></pre>
  
  <p>How can it be done? I tried numerous variations already, but nothing does the trick.</p>