def curry(func, n=EMPTY):
    """Curries func into a chain of one argument functions."""
    if n is EMPTY:
        n = get_spec(func).max_n

    if n <= 1:
        return func
    elif n == 2:
        return lambda x: lambda y: func(x, y)
    else:
        return lambda x: curry(partial(func, x), n - 1)
Curries func into a chain of one argument functions.
funcy/funcs.py