def test_pipeline(): funcs = [ lambda x: x+1, lambda x: x+2, lambda x: x+3, ] assert pipeline(0, funcs) == 6 assert pipeline(1, funcs) == 7
def test_pipeline(): funcs = [ lambda x: x + 1, lambda x: x + 2, lambda x: x + 3, ] assert pipeline(0, funcs) == 6 assert pipeline(1, funcs) == 7
def __call__(self, data): fns = [p.func for p in self.prev] + [self.func] return pipeline(data, fns)