1.1.6 Conditional Expressions and Predicates Flashcards

1
Q

A special form in Lisp for notating a case analysis

A

cond

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Parenthesized pairs of expressions used in a conditional statement (i.e. cond (<p> <e>))</e>

A

clauses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The first expression in a pair or clause whose value is evaluated as true or false

A

predicate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The value that is returned by the interpreter when a predicate is found whose value is true

A

consequent expression

(if none of the predicates is found to be true, cond is undefined)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Procedures that return true or false, as well as expressions that evaluate to true or false.

A

predicate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A restricted type of conditional that can be used when there are precisely two cases in the case analysis.

A

if

(if <predicate> <consequent> <alternative>)</alternative></consequent></predicate>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The three most frequently used logical composition operations that enable the construction of compound predicates.

A

and, or, not

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

And and or are special forms but not is an ordinary procedure. Why?

A

Because with and and or the subexpressions are not necessarily all evaluated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly