-1

I am trying to understand the fixed-point combinator. I think it is used by some languages to implement recursion. The main problem is that I couldn't get the next definition:

click here to see image

So please explain the image.

Enamul Hassan
  • 4,744
  • 22
  • 35
  • 52
Charlie
  • 100
  • 7

1 Answers1

0

That is an implementation of the fixed-point combinator in lambda calculus (called a Y-combinator). It satisfies the equation

enter image description here

There isn't too much to "get" about the implementation other than it satisfies the above.

The wikipedia entry here shows how the Y-combinator satisfies the above equation

FriedSaucePots
  • 1,282
  • 8
  • 15
  • I read the wikipedia entry, but is still not clear the semantic of that definition. specially the part where it says: (lamba x.f(x x)).. why is the parameter x repeated 2 times in function f. could you write here how to read that definition? – Charlie Oct 14 '15 at 20:35
  • 1
    `(x x)` is not `x` repeated twice, but x applied to itself. If you write out the two β-reduction steps given in the [wikipedia article](https://en.wikipedia.org/wiki/Fixed-point_combinator#Fixed_point_combinators_in_lambda_calculus) you see that this is essential in reducing `Y g` to `g (Y g)` Note: this is the direction of the reduction, *not* `g (Y g)` to `Y g` as you might expect for a fixpoint ("plug the fixpoint `Y g` into `g`, start the reducer and get `Y g` back: that is *not* how it works... ) – Hans Lub Oct 14 '15 at 20:52