Created
October 24, 2016 02:12
-
-
Save lihuanshuai/50ba3adebf01c001167c20413224c25f to your computer and use it in GitHub Desktop.
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 compose(*functions): | |
return functools.reduce(lambda f, g: lambda x: f(g(x)), functions, lambda x: x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment