1.5 cond
(cond [expr expr] ... [expr expr]) |
A cond form contains one or more “lines” that are
surrounded by parentheses or square brackets. Each line contains two
exprs: a question expr and an answer
expr.
The lines are considered in order. To evaluate a line, first evaluate the question expr. If the result is true, then the result of the whole cond expression is the result of evaluating the answer expr of the same line. If the result of evaluating the question expr is false, the line is discarded and evaluation proceeds with the next line.
If the result of a question expr is neither true nor false, it is an error. If none of the question exprs evaluates to true, it is also an error.