Part 11. cond Expressions
There are some cases where we need to have 3 or more parallel conditions. Unlike most languages, racket, a lisp dialect, has only 2 expressions for an if-expression.
Here is an example.
A cond has a question and answer pair. The last question can use else in place of the question.
Evaluation rules
First, the question and answer pairs are evaluated each. The question is then evaluated which outputs a boolean. If true, then the entire cond expression is then replaced with the answer. If false, the pair is dropped.
Mga Komento
Mag-post ng isang Komento