I recently discovered Ruby\'s blocks and yielding features, and I was wondering: where does this fit in terms of computer science theory? Is it a functional programming tech
I think 'coroutine' is the keyword you're looking for.
E.g. http://en.wikipedia.org/wiki/Yield
Yield in computing and information science: