Jump to content

Function application

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Tea2min (talk | contribs) at 14:38, 15 January 2014 (Undid revision 590802209 by 121.54.71.130 (talk)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In mathematics, 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 ƒ to its argument x.

In some instances, a different notation is used where 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:

The latter notation is especially useful in combination with the currying isomorphism. Given a function , its application is represented as by the former notation and by the latter. However, functions in curried form can be represented by juxtaposing their arguments: , rather than . This relies on function application being left-associative.

As an operator

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

The operator may also be denoted by a backtick (`).

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:

However, this is perhaps more clearly expressed by using function composition instead:

Other instances

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

The Curry-Howard correspondence relates function application to the logical rule of modus ponens.

See also