R3
Size: a a a
R3
R3
БГ
R3
БГ
R3
БГ
R3
Д
БГ
AT
БГ
БГ
def compose(chain):
if not any(map(callable, chain)):
raise ValueError("chain must be iterable of callables")
if not chain:
raise ValueError ("chain is empty")
def composed(*args, **kwargs):
func, *funcs = chain
result = func(*args, **kwargs)
for func in funcs:
result = func(result)
return result
return composed
БГ
БГ
БГ
𝕬
Д
A
K