title: Lisp &rest parameters and recursive calls
body: <p>I have the following Common Lisp Function: </p>
  
  <pre><code>(defun test(A &amp;rest indexes)
    (if (null (first indexes))
        A
      (test (nth (+ 1 (first indexes)) A) (rest indexes))
    )
  )
  </code></pre>
  
  <p>As far as I know <code>&amp;rest</code> parameters are treated as a list in the function body but since </p>
  
  <p><code>(rest indexes)</code> also returns a list I'm stuck with nested Lists as parameters.</p>
  
  <p>For example <code>(test '("a" "b" "c" ("d" "e")) 3 1 6 7) </code></p>
  
  <p>would cause indexes to be <code>((1 6 7)) </code> at the second call.</p>
  
  <p>Is there any way to pass my list without having this problem?</p>