test | an expression |
then | an expression |
else | an expression, default NIL |
IF special form is used for branching. Either "then" or "else" branch is taken. Then branch is selected when "test" result is not NIL. See also COND, CASE.
(if (> 3 4) "variant 1" "variant 2") => "variant 2" (if (> 4 3) "variant 1" "variant 2") => "variant 1"