Commit 3b849bc0 authored by Philipp Marek's avatar Philipp Marek Committed by lovrolu

Avoid duplicate logic in WHEN-LET*

By using an explicit PROGN we can interpolate straight into the LET.
The PROGN shouldn't matter, as the WHEN interferes with DECLAREs anyway.
parent 6bb56b6c
...@@ -83,11 +83,8 @@ PROGN." ...@@ -83,11 +83,8 @@ PROGN."
bindings))) bindings)))
(labels ((bind (bindings body) (labels ((bind (bindings body)
(if bindings (if bindings
`((let (,(car bindings)) `(let (,(car bindings))
(when ,(caar bindings) (when ,(caar bindings)
,@(bind (cdr bindings) body)))) ,(bind (cdr bindings) body)))
body))) `(progn ,@body))))
`(let (,(car binding-list)) (bind binding-list body))))
(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