Skip to content

Instantly share code, notes, and snippets.

@simon-engledew
Forked from vlazzle/curry.py
Created June 12, 2009 09:26
Show Gist options
  • Save simon-engledew/128537 to your computer and use it in GitHub Desktop.
Save simon-engledew/128537 to your computer and use it in GitHub Desktop.
def curry(function, *curried_args):
def curried_method(*args):
return function(*(curried_args + args))
return curried_method
def hello(firstname, lastname):
print "hello %s %s" % (firstname, lastname)
hello_mickey = curry(hello, 'Mickey')
hello_mickey('Mouse')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment