combinator

combinator

(theory)A function with no free variables. A term iseither a constant, a variable or of the form A B denoting theapplication of term A (a function of one argument) to termB. Juxtaposition associates to the left in the absence ofparentheses. All combinators can be defined from two basiccombinators - S and K. These two and a third, I, are definedthus:

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

There is a simple translation between combinatory logic andlambda-calculus. The size of equivalent expressions in thetwo languages are of the same order.

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

B f g x = f (g x)C f g x = f x gS' 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

See fixed point combinator, curried function,supercombinators.