unless is the negated counterpart to when.
Syntax
(unless ⟨test⟩
⟨expr⟩...)
Semantics
unlessis a convenience form for one-sided conditional code for effect.- Expressions in the body are sequenced as an implicit
progn. Any results are discarded; theunlessexpression returnsVoid(zero values). - A final body expression that already returns
Voidretains tail position when theunlessexpression is in tail position, including calls inrec. - Use
whenfor the negated form.
Example
(unless ready?
(error "Not ready"))