Next: , Previous: , Up: Exported definitions   [Contents][Index]


6.1.2 Macros

Macro: when-let BINDINGS &body FORMS

Creates new variable bindings, and conditionally executes FORMS.

BINDINGS must be either single binding of the form:

(variable initial-form)

or a list of bindings of the form:

((variable-1 initial-form-1)
(variable-2 initial-form-2)
...
(variable-n initial-form-n))

All initial-forms are executed sequentially in the specified order. Then all the variables are bound to the corresponding values.

If all variables were bound to true values, then FORMS are executed as an implicit PROGN.

Package

quickutil

Source

quickutil.lisp (file)

Macro: when-let* BINDINGS &body FORMS

Creates new variable bindings, and conditionally executes FORMS.

BINDINGS must be either single binding of the form:

(variable initial-form)

or a list of bindings of the form:

((variable-1 initial-form-1)
(variable-2 initial-form-2)
...
(variable-n initial-form-n))

Each initial-form is executed in turn, and the variable bound to the corresponding value. Initial-form expressions can refer to variables previously bound by the WHEN-LET*.

Execution of WHEN-LET* stops immediately if any initial-form evaluates to NIL. If all initial-forms evaluate to true, then FORMS are executed as an implicit PROGN.

Package

quickutil

Source

quickutil.lisp (file)