Lecture 5 - Page 16 : 26
Functional Programming in Scheme
The Order of Evaluation
* Referential transparency
Referential transparency
An illustration of referential transparency
* Introduction to evaluation order
Arbitrary evaluation order - with some limits
A motivating example
A motivating example - clarification
* Rewrite rules, reduction, and normal forms
Rewrite rules
The alpha rewrite rule
The beta rewrite rule
The eta rewrite rule
Normal forms
The ordering of reductions
An example of normal versus applicative evaluation
Theoretical results
Practical implications
Conditionals and sequential boolean operators
Lazy evaluation
* Delayed evaluation and infinite lists in Scheme
Delayed evaluation in Scheme
Examples of delayed evaluation
Infinite lists in Scheme: Streams
Example streams
Stream example: The sieve of Eratosthenes
Applications of The sieve of Eratosthenes
Theoretical results
The theoretical results mentioned on this page assure some very satisfactory properties of functional programming
The rewriting
=>
is
confluent
if for all e, e
1
and e
2
, for which e
=>
e
1
and e
=>
e
2
, there exists an e
3
such that e
1
=>
e
3
and e
2
=>
e
3
The first Church-Rosser theorem
. Rewriting with beta and eta conversions are confluent.
The second Church-Rosser theorem
. If e
0
=>
...
=>
e
1
, and if e
1
is on normal form, then there exists a normal order reduction of e
0
to e
1
Foldoc: church-rosser