def test_chain_iterable_inputs(): f = lambda x: (x, x + 2) g = lambda L: sum(L) h = chain(f, g) k = chain(f, sum) assert h(2) == 6 assert k(2) == 6
def test_chain_iterable_inputs(): f = lambda x : (x, x+2) g = lambda L : sum(L) h = chain(f, g) k = chain(f, sum) assert h(2) == 6 assert k(2) == 6
def test_chain(): f = lambda x: x**2 g = lambda x: (x, x + 2) h = lambda x, y: (x + y) k = chain(g, h, f) assert k(2) == 36
def test_chain(): f = lambda x: x**2 g = lambda x: (x, x+2) h = lambda x,y: (x+y) k = chain(g, h, f) assert k(2) == 36