            (sum-aux (+ acc x) (- x 1))))
           (sum (n)
             (sum-aux 0 n)))
    (sum 1000000)))</code></pre><p>That is it. Use this library, if you want to employ a tail call and want to ensure they a properly optimized by your Lisp implementation.</p>
<p>Maybe <a href="https://0branch.com/notes/tco-cl.html">this article</a> by Marc Simpson will be interesting for you. It investigates which Common Lisp implementations have a proper TCO implementation.</p>

<script src="https://utteranc.es/cli