Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
To understand exactly what a continuation captures, it is useful to think of the shift block as a “hole” inside the reset block. When you invoke the continuation, you can pass a value into the hole, and the computation runs as if the shift had that value. Consider this artificial example:
var cont : (Int => Double) = null
reset {
0.5 * shift { k : (Int => Double) => cont = k } + 1
}