Skip to content

Instantly share code, notes, and snippets.

@Djexus
Djexus / currying.py
Created September 4, 2011 19:48
Curry decorator for Python functions and methods
import inspect
def curry(func, *args, **kwargs):
'''
This decorator make your functions and methods curried.
Usage:
>>> adder = curry(lambda (x, y): (x + y))
>>> adder(2, 3)