Created
November 22, 2012 20:40
-
-
Save showell/4132851 to your computer and use it in GitHub Desktop.
silly way to compose functions in Python
This file contains hidden or 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 sumxyz(x): | |
def sumyz(y): | |
def sumz(z): | |
return x + y + z | |
return sumz | |
return sumyz | |
print sumxyz(5)(4)(3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment