Skip to content

Instantly share code, notes, and snippets.

@thomie
thomie / gist:5247145
Last active December 15, 2015 10:39 — forked from dxlbnl/gist:5245302
## Prelude.
from functools import partial
from itertools import chain, ifilter, islice, izip_longest
def compose(*funcs):
"""Return a function such that compose(a,b,c)(arg1, arg2, arg3)
is equivalent to a(b(c(arg1, arg2, arg3)))."""
# See http://bugs.python.org/issue1660179
def _composefunc(*args, **kw):