Skip to content

Instantly share code, notes, and snippets.

@notahat
Created November 16, 2010 05:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notahat/701487 to your computer and use it in GitHub Desktop.
Save notahat/701487 to your computer and use it in GitHub Desktop.
Ruby 1.9 lambda calculus fun
alias λ lambda
λ {|f| λ {|x| f[λ {|y| x[x][y] } ] }[λ {|x| f[λ {|y| x[x][y] }] }] }[λ {|f| λ {|n| n == 0 ? 1 : n * f[n-1] } }][6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment