Commit 50d66980 authored by Philipp Marek's avatar Philipp Marek

Revert "Avoid duplicate logic in WHEN-LET*."

This reverts commit 612700cd.
parent 408ff1d6
......@@ -79,13 +79,15 @@ Execution of WHEN-LET* stops immediately if any INITIAL-FORM evaluates to NIL.
If all INITIAL-FORMs evaluate to true, then BODY is executed as an implicit
PROGN."
(let ((binding-list (if (and (consp bindings) (symbolp (car bindings)))
(list bindings)
bindings)))
(list bindings)
bindings)))
(labels ((bind (bindings body)
(if bindings
`(let (,(car bindings))
(when ,(caar bindings)
(bind (cdr bindings) body)))
`(progn ,@body))))
(bind (cdr binding-list) body))))
`((let (,(car bindings))
(when ,(caar bindings)
,@(bind (cdr bindings) body))))
body)))
`(let (,(car binding-list))
(when ,(caar binding-list)
,@(bind (cdr binding-list) body))))))
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