Last active
August 29, 2015 14:04
-
-
Save hkupty/0ba733c0374964d41dec to your computer and use it in GitHub Desktop.
Currying python functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import partial | |
curry = lambda f, g: partial( | |
lambda F, G, *args, **kwargs: F(G(*args,**kwargs)), | |
f, g | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment