diff --git a/src/code/loop.lisp b/src/code/loop.lisp index 8e50390b7d73bd4bf61675a05c4f183e01a7eef0..6325f239d8ebbd806c91a1a1085b826c9ffd7581 100644 --- a/src/code/loop.lisp +++ b/src/code/loop.lisp @@ -995,7 +995,10 @@ collected result will be returned as the value of the LOOP." (if crocks (let ((*ignores* ())) (declare (special *ignores*)) - `((destructuring-bind ,(subst-gensyms-for-nil (car crocks)) + ;; Destructuring in loop doesn't require that the values be + ;; available. The missing elements are filled with NIL. So, + ;; make everything &optional + `((destructuring-bind (&optional ,@(subst-gensyms-for-nil (car crocks))) ,(cadr crocks) (declare (ignore ,@*ignores*)) ,@(loop-build-destructuring-bindings (cddr crocks) forms))))