curry function | Python

January 2nd, 2022 05:37:54 PM

					
from functools import partial def curry(fn, *args): return partial(fn, *args) add = lambda x, y: x + y add10 = curry(add, 10) add10(20) # 30

Featured Posts