def partial_sums(sequence):
    s = sequence.next()
    yield s
    for t in sequence:
        s += t
        yield s
Sequence of partial sums of a sequence.
dataset/ETHPy150Open probcomp/bayeslite/src/math_util.py/partial_sums