functools.partial(old_function, my_new_argument)
Is this such a useful thing that you need the functional style syntax to make it even easier to do?Add 5 to each num in a list (using a pretend function called `add` in both languages to be fair):
map(functools.partial(add, 5), nums)
map (add 5) nums
Add 5 to each in a list of list of numbers: map(functools.partial(map, functools.partial(add, 5)), nums)
map (map (add 5)) nums nums.map(|sublist| sublist.map(|num| add(num, 5))
Maybe I haven't done enough functional programming yet, but I still like the explicitness of the C-style over the functional style.