from functional import compose, foldr, partial

compose_mult = partial(reduce, compose)
chain_nodes = lambda nodes: map(compose_mult(nodes[1:]), nodes[0])
chain_gen_nodes = lambda nodes: map(compose_mult(g.send for g in nodes[1:]
    ), nodes[0])
How to compose iterators?