Search code examples
lispschemelambda-calculuscombinatorsy-combinator

Y Combinator in Scheme using Define


In order to learn what a fixed-point combinator is and is used for, I wrote my own. But instead of writing it with strictly anonymous functions, like Wikipedia's example, I just used define:

(define combine (lambda (functional)
                  (functional (lambda args (apply (combine functional) args))))

I've tested this with functionals for factorial and fibonacci, and it seems to work. Does this meet the formal definition of a fixed-point combinator?


Solution

  • The answer is no, because according to the blog referred to in the previous answer, it doesn't even meet the definition of combinator, since 'combine' is a free variable.