ABSTRACT

One of the most useful applications of higher-order functions is to represent continuations. A continuation is a function that is called to resume computation after some interruption. An explicit continuation is just an ordinary Lisp function, so we can define it to take any number of arguments. With explicit continuations in Common Lisp, we can also implement coroutines. In Common Lisp, the control structure is stack-oriented. This promotes modularity in programming, because the knowledge about the internal structure of a data type. Continuation-passing is a powerful technique. The drawback to the tail-recursive style is that the definition of the Common Lisp language does not require that every implementation optimize tail-recursive calls in this manner.