Skip to content

Instantly share code, notes, and snippets.

@smarnach
Created May 28, 2011 17:40
Show Gist options
  • Save smarnach/997063 to your computer and use it in GitHub Desktop.
Save smarnach/997063 to your computer and use it in GitHub Desktop.
def compose(*funcs):
def comp(x):
for f in reversed(funcs):
x = f(x)
return x
return comp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment