when conditionally runs its body when the test is True.
Syntax
(when ⟨test⟩
⟨expr⟩...)
Semantics
whenis a convenience form for one-sided conditional code for effect.- Expressions in the body are sequenced as an implicit
progn. Any results are discarded; thewhenexpression returnsVoid(zero values). - A final body expression that already returns
Voidretains tail position when thewhenexpression is in tail position, including calls inrec. - Use
unlessfor the negated form.
Example
(when verbose?
(show "starting"))