Skip to content

Instantly share code, notes, and snippets.

@jonykrause
Created March 22, 2014 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonykrause/9707796 to your computer and use it in GitHub Desktop.
Save jonykrause/9707796 to your computer and use it in GitHub Desktop.
Lambda Factorial ...
console.log(
function(gen) {
return gen(gen);
}(
function(gen) {
return (function() {
return function(n) {
return n == 0 ? 1 : n * gen(gen)(n-1);
}
})()
}
)(5)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment