Personal tools

Beta reduction

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(2 cents on wording / links.)
(2 intermediate revisions by 2 users not shown)

Revision as of 18:22, 3 February 2007

A beta reduction (also written β reduction) is the process of calculating a result from the application of a function to an expression.

Haskell theoretical foundations

Mathematics - Category theory
Research - Curry/Howard/Lambek

Lambda calculus:
Alpha conversion - Beta reduction
Eta conversion - Lambda abstraction

Recursion - Combinatory logic
Chaitin's construction - Turing machine
Relational algebra

For example, suppose we apply the function

(\x -> 2*x*x + y)
to the value
. To calculate the result, we substitute
for every free occurrence of
, and so the application of the function
(\x -> 2*x*x + y)(7)

is reduced to the result

2*7*7 + y

This is a beta reduction.

(Further reductions could be applied to reduce
. Although the lambdas are not explicit, they exist hidden in the definition of

Also see Lambda calculus and the wikipedia lambda calculus article.