Jump to content

Function application

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Porges (talk | contribs) at 03:52, 7 December 2008 (created page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Function application is the act of applying a function to an argument from its domain so as to obtain the corresponding value from its range.

Representation

Function application is usually depicted by juxtaposing the variable representing the function with its argument encompassed in parentheses. For example, the following expression represents the application of the function f to its argument x.

Because of the Currying isomorphism, the parentheses aren't required, and function application can be expressed just by juxtaposition. For example, the following expression can be considered the same as the previous one:

As an operator

Function application can be trivially defined as an operator , by the following definition:

This may not seem to have any immediate benefits, but if the operator is understood to be of low precedence and right-associative, the application operator can be used to cut down on the number of parentheses needed in an expression. For example;

can be rewritten as:

Other instances

Function application in the lambda calculus is expressed by β-reduction.

{math-stub}}