Lecture overview -- Keyboard shortcut: 'u'  Previous page: A motivating example -- Keyboard shortcut: 'p'  Next page: Rewrite rules, reduction, and normal forms [Section] -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home    Lecture 5 - Page 7 : 26
Functional Programming in Scheme
The Order of Evaluation
A motivating example - clarification

What is the value of the following expression?

((lambda (x) 1) some-infinite-calculation)

A constant function with an actual parameter expression, the evaluation of which never terminates.

y:/Kurt/Files/courses/prog3/prog3-03/sources/notes/includes/infinite-ex.scmA variation of the example in Scheme.


  • Different evaluation orders give different 'results'

    • The number 1

    • A non-terminating calculation

  • Two different semantics of function application are involved:

    • Strict: A function call is well-defined if and only if all actual parameters are well-defined

    • Non-strict: A function call can be well-defined even if one or more actual parameters cause an error or an infinite calculation