Created
August 18, 2015 13:14
-
-
Save kzar/ea70da930d3b1ddb525f to your computer and use it in GitHub Desktop.
Very simple example of how you could curry functions in Python using lambda
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
def example(a, b, c): | |
return (a, b, c) | |
curried1 = lambda b, c: example(1, b, c) | |
curried2 = lambda *args: example(1, *args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment