Created
May 30, 2012 08:30
-
-
Save gryzzly/2834543 to your computer and use it in GitHub Desktop.
fixed point in JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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