1 Beginning Student
2 Beginning Student with List Abbreviations
3 Intermediate Student
4 Intermediate Student with Lambda
5 Advanced Student
Index
On this page:
if
Version: 4.0.2

 

1.6 if

(if expr expr expr)

The first expr (known as the “test” expr) is evaluated. If it evaluates to true, the result of the if expression is the result of evaluating the second expr (often called the “then” expr). If the text expr evaluates to false, the result of the if expression is the result of evaluating the third expr (known as the “else” expr). If the result of evaluating the test expr is neither true nor false, it is an error.