title: What type is a function?
body: <p>let's try some calls to the "type" function :</p>
  
  <pre><code>user=&gt; (type 10)
  java.lang.Integer
  
  user=&gt; (type 10.0)
  java.lang.Double
  
  user=&gt; (type :keyword?)
  clojure.lang.Keyword
  </code></pre>
  
  <p>and now with an anonymous function :</p>
  
  <pre><code>user=&gt; (type #(str "wonder" "what" "this" "is"))
  user$eval7$fn__8
  </code></pre>
  
  <p><strong>A)</strong> what does this mean "user$eval7$fn__8" ?
  <strong>B)</strong> and what type is a function ?</p>
  
  <p>the source for "type" is :</p>
  
  <pre><code>user=&gt; (source type)
  (defn type
    "Returns the :type metadata of x, or its Class if none"
    {:added "1.0"}
    [x]
    (or (:type (meta x)) (class x)))
  nil
  </code></pre>
  
  <p>so a function needs to have a specific part of meta data or be a class</p>
  
  <p>checking the meta of an anonymous function yields nada :</p>
  
  <pre><code>user=&gt; (meta #(str "wonder" "what" "this" "is"))
  nil
  </code></pre>
  
  <p>trying a different approach :</p>
  
  <pre><code>user=&gt; (defn woot [] (str "wonder" "what" "this" "is"))
  #'user/woot
  user=&gt; (meta woot)
  {:ns #&lt;Namespace user&gt;, :name woot}
  </code></pre>
  
  <p><strong>C)</strong> seems there is some meta but i figured this is the meta of the symbol "woot", right ?</p>
  
  <p>what about the second half of the "or" :</p>
  
  <pre><code>user=&gt; (class #(str "wonder" "what" "this" "is"))
  user$eval31$fn__32
  
  user=&gt; (class woot)
  user$woot
  </code></pre>
  
  <p>what are these : "user$eval31$fn__32" and "user$woot" and where do they come from ?</p>
  
  <p>checking out the "class" function yields:</p>
  
  <pre><code>user=&gt; (source class)
  (defn ^Class class
    "Returns the Class of x"
    {:added "1.0"}
    [^Object x] (if (nil? x) x (. x (getClass))))
  nil
  </code></pre>
  
  <p>and further investigating yields :</p>
  
  <pre><code>user=&gt; (.getClass #(str "wonder" "what" "this" "is"))
  user$eval38$fn__39
  
  user=&gt; (.getClass woot)
  user$woot
  </code></pre>
  
  <p>i don't get it. 
  <strong>D)</strong> is this a hashcode : eval38$fn__39 ? 
  <strong>E)</strong> is this a symbol : woot ?</p>
  
  <p><strong>F)</strong> why doesn't a function have a type ? isn't it supposed to be an IFn or something ?</p>