Lab02 lambda_curry 匿名函数的柯理化 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 def lambda_curry2(func): """ Returns a Curried version of a two-argument function FUNC. >>> from operator import add, mul, mod >>> curried_add = lambda_curry2(add) >>> add_three = curried_add(3) >>> add_three(5) 8 >>> curried_mul = lambda_curry2(mul) >>> mul_5 = curried_mul(5) >>> mul_5(42) 210 >>> lambda_curry2(mod)(123)(10) 3