title: Is it possible to generate 40,000+ element of Fibonacci recursively in Lisp?
body: <p>I'm trying to solve <a href="http://projecteuler.net/index.php?section=problems&amp;id=2" rel="nofollow">Project Euler question 2</a> with Lisp. This recursive solution blows the stack on execution, but I thought Lisp (using clisp) would recognize the tail recursion. This is being entered into the top-level.</p>
  
  <pre><code>(defun e2-problem (&amp;optional (f1 1) (f2 1) (sum 0))  
     "Sum fibonacci sequence, even terms up to 4 million"
  
     (if (&gt; f2 4000000) sum)
     (e2-problem f2 (+ f1 f2) (if (evenp f2) 
                                  (+ sum f2) 
                                 sum))
  </code></pre>
  
  <p>Is my implementation not correctly arranged for optimization? I imagine this would hinder my Lisp education quite a bit if I could not rely on idiomatic recursion.</p>