Skip to content

Instantly share code, notes, and snippets.

@gryzzly
Created May 30, 2012 08:30
Show Gist options
  • Save gryzzly/2834543 to your computer and use it in GitHub Desktop.
Save gryzzly/2834543 to your computer and use it in GitHub Desktop.
fixed point in JavaScript
// An example from http://matt.might.net/articles/implementation-of-recursive-fixed-point-y-combinator-in-javascript-for-memoization/
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);});
}));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment