Next: , Up: Dynamic-Extent Declarations   [Contents][Index]


2.26.1 &rest argument lists

Rest argument lists can be allocated on the stack by declaring the rest argument variable dynamic-extent. Examples:

(defun foo (x &rest rest)
  (declare (dynamic-extent rest))
  ...)

(defun bar ()
  (lambda (&rest rest)
    (declare (dynamic-extent rest))
    ...))