if
(if
EXPRESSION EXPRESSION EXPRESSION)
The first expression (known as the "test" expression) is evaluated. If the expression evaluates to true, the result of the if
expression is the result of evaluating the second expression (often called the "then" clause). If the expression evaluates to false, the result of the if expression is the result of evaluating the third expression (known as the "else" clause). If the result of evaluating the test expression is neither true nor false, it is an error.
Reductions:
(if true e_1 e_2) --> e_1
(if false e_1 e_2) --> e_2
(if v_1 e e) e--> if: question result is not true or false
where v_1 is not false, and v_1 is not true
Beginning Student Language