UNLESS
UNLESS
is another simple LISP macro built on IF
. In LabLISP, UNLESS
is implemented as a special form. Accepts any number of arguments. The first argument - the condition - is evaluated and if it is NIL
, all the remaining forms are evaluated and result of the last one is returned, as in PROGN
. If the condition is not NIL
, the rest is ignored and when returns NIL
.
(unless c f1 f2 f3) ; syntax of UNLESS (if (not c) (progn f1 f2 f3)) ; equivalent construction with IF
See also IF
, PROGN
, WHEN
, AND
, OR