Skip to content

Instantly share code, notes, and snippets.

@dLobatog
Last active December 18, 2015 22:19
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 dLobatog/5853403 to your computer and use it in GitHub Desktop.
Save dLobatog/5853403 to your computer and use it in GitHub Desktop.
Currying1
# So this:
proc { |x, y, z| x + y + z }.curry
# is actually this:
proc { |x| proc { |y| proc { |z| x + y + z} } }
# The above can also translate to:
# f:(X × Y x Z)→N currying produces curry(f): X→(Y→(Z→N)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment