title: Why need even number of keyword parameters in Common Lisp?
body: <p>I am trying to implement tail call recursive factorial in Common Lisp, to try it and just experience it.</p>
  
  <p>I copied some code and rewrote it in Common Lisp like so:</p>
  
  <pre><code>(defun tailrecsum (x &amp;key (running-total 0 running-total-p))
      (if (= x 0)
          (if running-total-p running-total 0)
          (tailrecsum (- x 1) (+ running-total x))))
  </code></pre>
  
  <p>However, I get first a warning:</p>
  
  <pre><code>SIMPLE-WARNING: 
  The function has an odd number of arguments in the keyword portion.
  </code></pre>
  
  <p>And when trying to run it, I get an error:</p>
  
  <pre><code>SIMPLE-PROGRAM-ERROR: 
  odd number of &amp;KEY arguments
  </code></pre>
  
  <p>Why can't I have an odd number of keyword arguments? What's the problem with that and what can I do about it?</p>
  
  <p>For example in Python I could write:</p>
  
  <pre><code>def func(a, b=10):
      print([a, b])
  </code></pre>
  
  <p>So I would have an odd number, one, of keyword arguments. No issues there.</p>