UNB/ CS/ David Bremner/ teaching/ cs2613/ labs/ L20/ gencounter.py
def make_counter(x):
    print('entering make_counter')
    while True:
        yield x
        print('incrementing x')
        x = x + 1

print('first')
counter = make_counter(100)
print('second')
print(next(counter))
print('third')
print(next(counter))
print('last')