Eta reduction
Eta-reduction or η-reduction is the process of removing a “pointless” abstraction. The name originally comes from considerations about the lambda calculus ; however, the concept per se is not limited to this. In a function definition such as , which could also be written as , the introduction of a name for the function argument of is of no use. The eta-reduced variant is .
The reverse process (explicitly naming a parameter of a function) is called η-expansion and is used, for example, when this enables further useful transformations.
Example from programming ( Haskell )
The following two function definitions are synonymous:
addiereZehnZu x = (+) 10 x
addiereZehnZu = (+) 10
-- in beiden Fällen ergibt die Ausführung von ...
addiereZehnZu 5
-- ... das Ergebnis 15.
-- auch dies ist eine Eta-Reduktion.