Difference between revisions of "Eta conversion"
Jump to navigation
Jump to search
and
BrettGiles (talk | contribs) (Add infobox) |
(link to recent thread in Haskell-Cafe) |
||
Line 1: | Line 1: | ||
− | |||
{{Foundations infobox}} |
{{Foundations infobox}} |
||
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: <haskell>\x -> abs x |
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: <haskell>\x -> abs x |
||
Line 6: | Line 5: | ||
Extensive use of η-reduction can lead to [[Pointfree]] programming. It is also typically used in certain compile-time optimisations. |
Extensive use of η-reduction can lead to [[Pointfree]] programming. It is also typically used in certain compile-time optimisations. |
||
+ | |||
+ | == See also == |
||
+ | |||
+ | * Haskell-Cafe on [http://www.haskell.org/pipermail/haskell-cafe/2010-December/087782.html What's the motivation for η rules?] |
||
[[Category:Glossary]] |
[[Category:Glossary]] |
Revision as of 23:55, 6 January 2011
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
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.
See also
- Haskell-Cafe on What's the motivation for η rules?