def cumsum(iterable):
    """ Cumulative addition: list(cumsum(range(4))) => [0, 1, 3, 6] 
        
        Return a list of numbers
    """
    iterable = iter(iterable)
    s = iterable.next()
    yield s
    for c in iterable:
        s = s + c
        yield s
