diff --git a/src/lsp/loop.lsp b/src/lsp/loop.lsp index c696c3e87..c4bffa132 100644 --- a/src/lsp/loop.lsp +++ b/src/lsp/loop.lsp @@ -659,8 +659,12 @@ collected result will be returned as the value of the LOOP." (cond ((null tree) (car (push (gensym) *ignores*))) ((atom tree) tree) - (t (cons (subst-gensyms-for-nil (car tree)) - (subst-gensyms-for-nil (cdr tree)))))) + ((atom (cdr tree)) + (cons (subst-gensyms-for-nil (car tree)) + (subst-gensyms-for-nil (cdr tree)))) + (t + (list* '&optional + (mapcar #'subst-gensyms-for-nil tree))))) (defun loop-build-destructuring-bindings (crocks forms) (if crocks