by scotty79 · 14y ago · 0 comments
But Y?
function Y($F) {
$func = function ($f) { return $f($f); };
return $func(function ($f) use($F) {
return $F(function ($x) use($f) {
$ff = $f($f);
return $ff($x);
});
});
}Anyway, that's a joke implementation of the Y combinator[1] in PHP.
[1] http://en.wikipedia.org/wiki/Fixed-point_combinator#Y_combin...