Lably
Skip to content

Function application

Evaluation of a function on its argument

  • 9 min read
  • 7 chapters

Related on Lably

Through Mathematics, Function (mathematics) and Domain of a function

It is central to programming languages derived from lambda calculus, such as LISP and Scheme, and also in functional languages. It has a role in the study of the denotational semantics of computer programs, because it is a continuous function on complete partial orders. Function application is also a continuous function in homotopy theory, and, indeed underpins the entire theory: it allows a homotopy deformation to be viewed as a continuous path in the space of functions. Likewise, valid mutations (refactorings) of computer programs can be seen as those that are "continuous" in the Scott topology.

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.

f(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:

fx

The latter notation is especially useful in combination with the currying isomorphism. Given a function f:(X×Y)→Z, its application is represented as f(x,y) by the former notation and f(x,y) (or f⟨x,y⟩ with the argument ⟨x,y⟩∈X×Y written with the less common angle brackets) by the latter. However, functions in curried form f:X→(Y→Z) can be represented by juxtaposing their arguments: fxy, rather than f(x)(y). This relies on function application being left-associative.

When mathematical notation is represented in a digital document, the invisible zero-width Unicode characters U+2061 FUNCTION APPLICATION and U+2062 INVISIBLE TIMES can be used to distinguish concatenation meaning function application from concatenation meaning multiplication.

Sign in to keep reading

6 more chapters are free with a Lably account.

More in Computing and communication