Commit 5b5082c6 authored by Raymond Toy's avatar Raymond Toy

Merge branch 'issue-91-loop-destructuring-bind' into 'master'

Fix #91: loop destructuring bind

Closes #91

See merge request cmucl/cmucl!63
parents fdeafbc6 1144015f
......@@ -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))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment