(rontolisp) docs
← Macros

uiop:when-let

(uiop:when-let ((var form)...) body...)

uiop:if-let with an implicit progn body and no else branch: binds the variables in parallel, and evaluates the body only when every variable came out non-nil. Returns nil otherwise.

The single un-nested binding spelling — (uiop:when-let (x form) ...) — is accepted here too.

uiop is ASDF's portability layer, not part of Common Lisp: the name is only reachable with the uiop: qualifier.

Backend support

Works on all four backends: it is a built-in macro expansion shared by the interpreter and both compilers. Like the other built-in macros it has no function value (#'uiop:when-let is an error).