Skip to content

Instantly share code, notes, and snippets.

@penartur
Created June 1, 2012 05:55
Show Gist options
  • Save penartur/2849315 to your computer and use it in GitHub Desktop.
Save penartur/2849315 to your computer and use it in GitHub Desktop.
var fib = function (a) { return function (b) { return a(function (c) { return b(b)(c); }); }(function (d) { return a(function (e) { return d(d)(e); }); }); }(function (g) { return function (n) {
return n <= 2 ? 1 : g(n-1) + g(n-2);
}; });
@penartur
Copy link
Author

e.g. fib(8) === 21

@Starstalker-awe
Copy link

*Me trying to convert this to arrow functions*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment