[comp.lang.lisp] continuations in Common Lisp

spector@brillig.umd.edu (Lee Spector) (12/19/89)

Some recent work involving lots of co-routining has sparked my interest
in "continuations."  I have read a bit about continuations in Scheme, but
I have found little about continuations in CL.  I scanned the indices of
several Common Lisp books, and found only one, Hennessey's, that refers
to continuations in CL.  Hennessey gives a short explanation and some
code which implements "downward" continuations, but which will not work
for so-called "upward" continuations.  I have the following questions:

1) Does anyone know of existing CL code which "fully" implements continuations;
   i.e., which implements both downward and upward continuations?  If so,
   how can this code be obtained?

2) Does anyone know of an explanation of the functionality and uses of
   continuations that uses CL as the base language (other than Hennessey's)?
   I've seen what appear to be good discussions of these issues, but they
   have all been based on Scheme, and I'm not really Scheme-literate.

Thanks alot!  -Lee (spector@cs.umd.edu)

lou@atanasoff.rutgers.edu (Lou Steinberg) (12/20/89)

In article <21344@mimsy.umd.edu> spector@brillig.umd.edu (Lee Spector) writes:

> 1) Does anyone know of existing CL code which "fully" implements continuations;
>    i.e., which implements both downward and upward continuations?  If so,
>    how can this code be obtained?

As far as I can tell, it would require an extension to CL to duplicate
the ease of use of continuations that scheme has.  E.g. I don't think
there is any way to implement Scheme's "call-with-current-continuation"
in portable common lisp, at least not with the generality of the
version in Scheme.

> 
> 2) Does anyone know of an explanation of the functionality and uses of
>    continuations that uses CL as the base language (other than Hennessey's)?

Artificial Intelligence Programming 2nd edition, by Charniak, et al. ,
Lawrence Erlbaum Publishers, has an extensive discussion of
continuation-passing style programming in common lisp, including a
section on using it to implement co-routines.
-- 
					Lou Steinberg

uucp:   {pretty much any major site}!rutgers!aramis.rutgers.edu!lou 
arpa:   lou@cs.rutgers.edu