2 ms·
Your definition of recursion is overly broad. var Y = function (F) { return (function (x) { return F(function (y) { return (x(x))(y);}); }
by walrus 15y ago
Your definition of recursion is overly broad.
var Y = function (F) {
return (function (x) {
return F(function (y) { return (x(x))(y);});
})
(function (x) {
return F(function (y) { return (x(x))(y);});
}) ;
} ;
[...]
The Y combinator is a closed expression--it makes no
explicit reference to an outside variable or to itself.
Clearly, there is no recursion, iteration or mutation.
Look at the definition of Y—there are no capital Ys after the 5th character (or any equivalent things like arguments.callee).
- SteveJS 15y agoAh ... I misinterpreted the statement to encompass the expression rather then just the application of the Ycombinator. Y(F) is not recursive. (Y(F))(X) is recursive. Is that accurate?