title: Is it possible to decompose a Clojure function?
body: <p>While I may incorrectly interpret the concept of homoiconicity, I've understood it as 'code being data'.</p>
  
  <p>So, I can write code like this:</p>
  
  <pre><code>(def subject "world")
  (def helo '(str "Hello " subject))
  </code></pre>
  
  <p>At this point, <code>helo</code> is only data, but can be executed as code like this:</p>
  
  <pre><code>(eval helo)
  </code></pre>
  
  <p>which returns "Hello world".</p>
  
  <p>I can also continue to treat <code>helo</code> as data:</p>
  
  <pre><code>(first helo)
  (count helo)
  </code></pre>
  
  <p>which returns respectively <code>str</code> and <code>3</code>.</p>
  
  <p>So far so good. However, as soon as I wrap the code in a function, I seem to lose the ability to treat code as data:</p>
  
  <pre><code>(defn helofn [subject]
    (str "Hello " subject))
  </code></pre>
  
  <p>How do I decompose <code>helofn</code>? It seems that I can't treat it as data; if I do this:</p>
  
  <pre><code>(count helofn)
  </code></pre>
  
  <p>I get an exception:</p>
  
  <blockquote>
    <p>java.lang.UnsupportedOperationException: count not supported on this type: user$helofn</p>
  </blockquote>
  
  <p>Is there another way to decompose <code>helofn</code>, or am I just expecting too much from homoiconicity?</p>