A downward-only version of Scheme's call with current continuation.
callCC(fun)
| Parameter | Description |
|---|---|
fun |
function of one argument, the exit procedure. |
# NOT RUN {
# The following all return the value 1
callCC(function(k) 1)
callCC(function(k) k(1))
callCC(function(k) {k(1); 2})
callCC(function(k) repeat k(1))
# }