recursion_without_name.scm ; JSvar Y = function(f) { return function(x) { return x(x) }(function (x) { return f(function(y) { return x(x)(y) }) })} var F = function(g) { return function(n) { if (n == 0) { return 1; } else { return n * g(n-1
; JS var Y = function(f) { return function(x) { return x(x) }(function (x) { return f(function(y) { return x(x)(y) }) }) } var F = function(g) { return function(n) { if (n == 0) { return 1; } else { return n * g(n-1); } } } Y(F)(5) ; Scheme (define F (lambda (g) (lambda (n) (if (= n 0) 1 (* n (g (- n 1))))))) (define Y (lambda (f) ((lambda (x) (x x)) (lambda (x) (f (lambda (y) ((x x) y))))))) ((Y F) 5)