title: ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn
body: <p>I have a function that takes the number of years and salary, then recursively doubles the salary until years is exhausted.  However, I keep getting this error:</p>
  
  <blockquote>
    <p>ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn</p>
  </blockquote>
  
  <p><strong>The Code</strong></p>
  
  <pre><code>(defn calculate-salary
      [years salary]
      (if (= years 0)
          (salary)
          (calculate-salary (- years 1) (* salary 2))))
  </code></pre>
  
  <p>I'm very new to Clojure so I'm sure its something simple, but I just can't seem to figure it out.</p>