1.1.6 Conditional Expressions and Predicates Flashcards
A special form in Lisp for notating a case analysis
cond
Parenthesized pairs of expressions used in a conditional statement (i.e. cond (<p> <e>))</e>
clauses
The first expression in a pair or clause whose value is evaluated as true or false
predicate
The value that is returned by the interpreter when a predicate is found whose value is true
consequent expression
(if none of the predicates is found to be true, cond is undefined)
Procedures that return true or false, as well as expressions that evaluate to true or false.
predicate
A restricted type of conditional that can be used when there are precisely two cases in the case analysis.
if
(if <predicate> <consequent> <alternative>)</alternative></consequent></predicate>
The three most frequently used logical composition operations that enable the construction of compound predicates.
and, or, not
And and or are special forms but not is an ordinary procedure. Why?
Because with and and or the subexpressions are not necessarily all evaluated.