Page:Scheme - An interpreter for extended lambda calculus.djvu/4

   evaluates  in an environment where   is bound to a continuation which is "just about to return from the  "; that is, if the continuation is called as a function of one argument, then control proceeds as if the   expression had returned with the supplied (evaluated) argument as its value. For example, consider the following obscure definition of  (Sussman's favorite style/Steele's least favorite):

Anyone who doesn't understand how this manages to work probably should not attempt to use.

As another example, we can define a  function, which may then be used with   much as they are in LISP:

    This is the process generator for multiprocessing. It takes one argument, an expression to be evaluated in the current environment as a separate parallel process. If the expression ever returns a value, the process automatically terminates. The value of  is a process id for the newly generated process. Note that the newly created process will not actually run until it is explicitly started.     This takes one argument, a process id, and starts up that process. It then runs.     This also takes a process id, but stops the process. The stopped process may be continued from where it was stopped by using  again on it. The magic global variable  always contains the process id of the currently running process; thus a process can stop itself by doing. A stopped process is garbage collected if no live process has a pointer to its process id.  <dt> </dt> </dl>