title: How to implement optional arguments in CHICKEN?
body: <p>I'm new to CHICKEN and Scheme. In my quest to understanding tail recursion, I wrote:</p>
  
  <pre><code>(define (recsum x) (recsum-tail x 0))
  (define (recsum-tail x accum)
    (if (= x 0)
        accum
        (recsum-tail (- x 1) (+ x accum))))
  </code></pre>
  
  <p>This does what I expect it to. However, this seems a little repetitive; having an optional argument should make this neater. So I tried:</p>
  
  <pre><code>(define (recsum x . y)
    (let ((accum (car y)))
      (if (= x 0)
          accum
          (recsum (- x 1) (+ x accum)))))
  </code></pre>
  
  <p>However, in CHICKEN (and maybe in other scheme implementations), <code>car</code> cannot be used against <code>()</code>:</p>
  
  <pre><code>Error: (car) bad argument type: ()
  </code></pre>
  
  <p>Is there another way to implement optional function arguments, specifically in CHICKEN 5?</p>