ENCYCLOPEDIA 4U .com



Encyclopedia Home Page

Google
  Web Encyclopedia4u.com

 

Combinator

In mathematics, a combinator is a function with no free variables.

In computer science, combinators have been used as a basis for the semantics of functional programming languages.

A term of a combinator is either a constant, a variable, or an application of the form (A B), denoting the application of term A (a function of one argument) to term B. Application associates to the left in the absence of parentheses. All combinators can be defined as a composition of two basic combinators - S and K. These two and a third, I, are defined thus:

(S f g x)	= (f x (g x))
(K x y)	= x
(I x)	= x	= (S K K x)

There is a simple translation between combinatory logic and the lambda-calculus. However, combinatorial expressions are much larger than their lambda-calculus equivalents.

A combinator of particular interest is the Y combinator, which is a fixed point combinator and can be used to implement recursion.

Other combinators were added by David Turner in 1979 when he used combinators to implement SASL:

(B f g x) = (f (g x))
(C f g x) = (f x g)
(S' c f g x) = (c (f x) (g x))
(B* c f g x) = (c (f (g x)))
(C' c f g x) = (c (f x) g)

Some special-purpose computers have been built to perform combinator calculations by graph reduction. Examples include the SKIM ("S-K-I machine") computer, built at Cambridge University, and the multiprocessor GRIP ("Graph Reduction In Parallel") computer, built at UCL.

See also:


The original version of article was based on material from FOLDOC, used with permission.





Content on this web site is provided for informational purposes only. We accept no responsibility for any loss, injury or inconvenience sustained by any person resulting from information published on this site. We encourage you to verify any critical information with the relevant authorities.



Copyright © 2005 Par Web Solutions All Rights reserved.
| Privacy

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Combinator".