Search results
Results From The WOW.Com Content Network
The Y combinator is an implementation of a fixed-point combinator in lambda calculus. Fixed-point combinators may also be easily defined in other functional and imperative languages. The implementation in lambda calculus is more difficult due to limitations in lambda calculus. The fixed-point combinator may be used in a number of different areas:
Lambda calculus is Turing complete, that is, it is a universal model of computation that can be used to simulate any Turing machine. [3] Its namesake, the Greek letter lambda (λ), is used in lambda expressions and lambda terms to denote binding a variable in a function.
The term λx. λy. x, sometimes called the K combinator, is written as λ λ 2 with de Bruijn indices. The binder for the occurrence x is the second λ in scope. The term λx. λy. λz. x z (y z) (the S combinator), with de Bruijn indices, is λ λ λ 3 1 (2 1). The term λz. (λy. y (λx. x)) (λx. z x) is λ (λ 1 (λ 1)) (λ 2 1). See the ...
For example, a list of three elements x, y and z can be encoded by a higher-order function that when applied to a combinator c and a value n returns c x (c y (c z n)). Equivalently, it is an application of the chain of functional compositions of partial applications, (c x ∘ c y ∘ c z) n.
Combinatory logic is a model of computation equivalent to lambda calculus, but without abstraction. The advantage of this is that evaluating expressions in lambda calculus is quite complicated because the semantics of substitution must be specified with great care to avoid variable capture problems.
A Calculus of Mobile Processes, Part I (PostScript) (by Milner, Parrow, and Walker) shows a scheme for combinator graph reduction for the SKI calculus in pages 25–28. the Nock programming language may be seen as an assembly language based on SK combinator calculus in the same way that traditional assembly language is based on Turing machines.
Also of note, Y combinator has a short expression in this system, as Y = BU(CBU) = BU(BWB) = B(W(WK))(BWB), where U = WI = SII is the self-application combinator. Using just two combinators, B and W , an infinite number of fixpoint combinators can be constructed, one example being B ( WW )( BW ( BBB )), discovered by R. Statman in 1986.
A common theme in lambda calculus is to find fixed points of given lambda expressions. Every lambda expression has a fixed point, and a fixed-point combinator is a "function" which takes as input a lambda expression and produces as output a fixed point of that expression. [8]