Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
writer = partial(export_image, './save it here please.jpg', overwrite=True) expensive_process(loads_of_images, intermediate_save=writer)
with filepath the other way round I have to flip args:
writer = lambda img: export_image(img, './save it here please.jpg', overwrite=True)
that's contrived of course and not that severe, but see this talk for a great example of how you can have really nice patterns if you think about argument ordering carefully.