1 minute, 52 seconds
Expressions, Types, and Functions
- slide 7 : 46
Evaluation of parenthesized expressions
How is the form
(
a b c d e
)
evaluated in Scheme?
Evaluation rules
The evaluation of the empty pair of parentheses
( )
is in principle an error
If
a
is the name of a special form, such as
lambda
,
if
,
cond
, or
define
special rules apply
In all other cases:
Evaluate all subforms uniformly and recursively.
The value of the first constituent
a
must
be a function object. The function object is called with the values of
b
,
c
,
d
, and
e
as actual parameters.
R5RS: Procedure calls
Beta Reduction - calling a function