curring means take a part of argument and return a new function
我们可以用functools.partial来实现python 的 currying化
def add(a,b):
return a + b
from functools import partial
add1 = partial(add, 1)
print add1(5)
curring means take a part of argument and return a new function
我们可以用functools.partial来实现python 的 currying化
def add(a,b):
return a + b
from functools import partial
add1 = partial(add, 1)
print add1(5)