from functools import reduce
def chain_imap_accumulate(seq, f):

    def acc_f(x):
        for n in f(x[-1]):
            yield x + (n,)
return chain.from_iterable(map(acc_f, seq))

def accumulative_product(*generators):
    head, tail = generators[0], generators[1:]
head = map(tuple, head())
return reduce(chain_imap_accumulate, tail, head)
Эквивалентная структура вложенного цикла с Itertools