Personal tools

Eta conversion

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Added slightly more chatter.)
m
Line 3: Line 3:
 
Converting from the first to the second would constitute an eta ''reduction'', and moving from the second to the first would be an eta ''abstraction''. The term 'eta conversion' can refer to the process in either direction.
 
Converting from the first to the second would constitute an eta ''reduction'', and moving from the second to the first would be an eta ''abstraction''. The term 'eta conversion' can refer to the process in either direction.
   
Extensive use of η-reduction can lead to [[Pointfree]] programming. It is also typically used it certain compile-time optimisations.
+
Extensive use of η-reduction can lead to [[Pointfree]] programming. It is also typically used in certain compile-time optimisations.
   
 
[[Category:Glossary]]
 
[[Category:Glossary]]

Revision as of 12:58, 30 January 2007

An eta conversion (also written η-conversion) is adding or dropping of abstraction over a function. For example, the following two values are equivalent under η-conversion:
\x -> abs x
and
abs

Converting from the first to the second would constitute an eta reduction, and moving from the second to the first would be an eta abstraction. The term 'eta conversion' can refer to the process in either direction.

Extensive use of η-reduction can lead to Pointfree programming. It is also typically used in certain compile-time optimisations.