title: Stack overflow from recursive function call in Lisp
body: <p>I am learning Lisp from the book "The Land of Lisp" by Conrad Barski. Now I have hit my first stumbling block, where the author says:</p>
  
  <blockquote>
    <p>Calling yourself in this way is not only allowed in Lisp, but is often
    strongly encouraged</p>
  </blockquote>
  
  <p>after showing the following example function to count the items in a list:</p>
  
  <pre><code>(defun my-length (list)
    (if list
      (1+ (my-length (cdr list)))
      0))
  </code></pre>
  
  <p>When I call this function <code>my-length</code> with a list containing a million items, I get a stack overflow error. So either you never expect to have a list that long in Lisp (so maybe my use case is useless) or there is another way to count items in such a long list. Can you maybe shine some light on this? (I am using GNU CLISP on Windows, by the way).</p>