2 ms·
A good resource for this is the control operations chapter [0] in Programming Languages: Application and Interpretation [1]. It start off with some motivation,
by dmunoz 13y ago
A good resource for this is the control operations chapter [0] in Programming Languages: Application and Interpretation [1]. It start off with some motivation, then covers generators and continuations, with mention of threads and coroutines. The base motivation and most code is for an interpreter implementation, but it isn't impossible to follow if you're not familiar with such material.
[0] http://cs.brown.edu/courses/cs173/2012/book/Control_Operations.html http://cs.brown.edu/courses/cs173/2012/book/Control_Operatio...
[1] http://cs.brown.edu/courses/cs173/2012/book/index.html http://cs.brown.edu/courses/cs173/2012/book/index.html