Y Combinator implementation Scheme
<p>I am really new to scheme functional programming. I recently came across Y-combinator function in lambda calculus, something like this <code>Y ≡ (λy.(λx.y(xx))(λx.y(xx)))</code>. I wanted to implement it in scheme, i searched alot but i didn't find any implementation which exactly matches the above given structure. Some of them i found are given below:</p>

<pre><code>(define Y
(lambda (X)
  ((lambda (procedure)
     (X (lambda (arg) ((procedure procedure) arg))))
   (lambda (procedure)
     (X (lambda (arg) ((procedure procedure) arg)))))))
</code></pre>

<p>and</p>

<pre><code>(define Y
  (lambda (r)
    ((lambda (f) (f f))
     (lambda (y)
       (r (lambda (x) ((y y) x)))))))
</code></pre>

<p>As you can see, they dont match with the structure of this <code>Y ≡ (λy.(λx.y(xx))(λx.y(xx)))</code> combinator function. How can I implement it in scheme in exactly same way?</p>