Conditionally evaluates expressions
(if testexpr thenexpr [elseexpr])
The if function returns the value of the selected expression. If elseexpr is missing and testexpr is nil, then it returns nil.
Command: (if (= 1 3) "YES!!" "no.")
"no."
Command: (if (= 2 (+ 1 1)) "YES!!")
"YES!!"
Command: (if (= 2 (+ 3 4)) "YES!!")
nil
See Also
-
The progn function.