Lecture overview -- Keyboard shortcut: 'u'  Previous page: The beta rewrite rule -- Keyboard shortcut: 'p'  Next page: Normal forms -- 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 12 : 26
Functional Programming in Scheme
The Order of Evaluation
The eta rewrite rule

An eta conversion lifts certain function calls out of a lambda convolute

A function f, which only passes its parameters on to another function e, can be substituted by e

(lambda(x) (e x)) <=> e   provided that x is not free in the expression e

Legal conversion:


Converted Expression

(lambda (x) (square x))

An example of an eta rewriting.

Illegal conversion:


Converted Expression

(lambda(x) ((lambda(y) (f x y)) x))
(lambda(y) (f x y))

An example of an illegal eta conversion. The eta conversion rule says in general how 'e' is lifted out of the lambda expressions. In this example, e corresponds to the emphasized inner lambda expression (which is blue on a color medium.) However, x is a free name in the inner lambda expression, and therefore the application of the eta rewrite rule is illegal.