Take for example,
The follow python code:
def multiples_of_2(): i = 0 while True: i = i + 2 yield i
How do we translate thi
I found a good article recently on coroutines in C, which describes one method of doing this. It's certainly not for the faint of heart.