Re: &REST variable OBJECTS must be dynamic-extent.
Frode Vatvedt Fjeld <[email protected]> Mon, 18 Apr 2005 00:31:34 +0200
| Newsgroups | gmane.lisp.movitz.devel |
|---|---|
| Message-ID | <[email protected]> |
Shawn Betts <[email protected]> writes: > It seems sometimes having a &rest variable in a function causes a > strange error. Is this a known issue? It's kind of irritating :). Turned out this could be fixed without too much effort. What I've done is to have e.g. (defun silly-fn (&rest objects) (mapcar #'+ objects)) compile as (defun silly-fn (&rest objects) (declare (dynamic-extent objects)) (let ((objects (copy-list objects))) (mapcar #'+ objects))) I've not tested it extensively, but I hope it works for you. -- Frode Vatvedt Fjeld