I am trying to write a currying decorator in python, and I think I\'ve got the general idea down, but still got some cases that aren\'t working right...
def
One-liner just for fun:
from functools import partial curry = lambda f: partial(*[partial] * f.__code__.co_argcount)(f) @curry def add(x, y, z): return x + y + z print(add(2)(3)(4)) # output = 9