Lecture overview -- Keyboard shortcut: 'u'  Previous page: The function concept -- Keyboard shortcut: 'p'  Next page: Lambda Expressions in Scheme -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 1 - Page 27 : 49
Programming Paradigms
Introduction to Functional Programming in Scheme
Evaluation of parenthesized expressions in Scheme

Here we will emphasize the rules of evaluating a form like (a b c d e) in Scheme

How is the form (a b c d e) evaluated in Scheme?
The form (a b c d e) appears as a pair of parentheses with a number of entities inside. The question is how the parenthesized expression is evaluated, and which constraints apply to the evaluation.

  • 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

      • The value of a must be a function object.

      • The function object is called with the values of b, c, d, and e as actual parameters.

The evaluation of the empty pair of parentheses ( ) is often - in concrete Scheme systems - considered as the same as '( ), which returns the empty list. However, you should always quote the empty pair of parentheses to denote the empty list.