You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
211 B
9 lines
211 B
import functools
|
|
|
|
|
|
# from jaraco.functools 3.5.2
|
|
def compose(*funcs):
|
|
def compose_two(f1, f2):
|
|
return lambda *args, **kwargs: f1(f2(*args, **kwargs))
|
|
|
|
return functools.reduce(compose_two, funcs)
|
|
|