[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple values proposal

   Date: Thu, 18 Mar 93 11:23:18 -0500
   From: "Aubrey Jaffer" <jaffer@martigny.ai.mit.edu>

      From: Norman Adams <norman@parc.xerox.com>
      Date: 	Sun, 17 May 1992 23:34:37 PDT

      Here is the most recent proposal for multiple values that I could find.

      %%% Multiple values compromise proposal of December 4, 1989.
      %%% This is raw TeX.
      \advance\hsize by -5cm

      The editors are directed to add text to R$^5$RS so as to include the
      procedures {\tt \mvcontinue{}} and {\tt\mvcall{}} consistent with the
      following definitions.  The {\tt \mvcontinue{}} procedure takes any
      number of arguments, and simply passes them to its continuation.  The
      {\tt\mvcall{}} procedure takes a thunk and a procedure, and calls the
      thunk with a continuation that, when passed some values, calls the
      procedure that was the second argument to the {\tt\mvcall{}} procedure
      with those values as arguments.  Except for continuations created by
      the {\tt\mvcall{}} procedure, all continuations take exactly one
      value, as now; the effect of passing no value or more than one value
      to continuations that were not created by the {\tt\mvcall{}} procedure
      is unspecified (as indeed it is unspecified now).
      Suggested formal semantics:
      $$\hbox{\it \mvcontinue{}} = \lambda\epsilon^*\kappa . \kappa\epsilon^*$$
      $$\hbox{\it \mvcall{}} = \hbox{\it twoarg }(\lambda \epsilon_1
      \epsilon_2\kappa . \hbox{ \it applicate } \epsilon_1 \langle \rangle
      \lambda \epsilon^* . \hbox{ \it applicate } \epsilon_2
      \epsilon^* \kappa)$$


I hate to throw a monkey wrench into the whole process, but the above
does not match my recollection of what was approved at the R5RS
meeting.  In the expression 
  (lambda (k)
   (k (values 1 2 3))))
 (lambda (a b c)
  . . .))

k better be a continuation that accepts 3 values or things are going
to be very broken.
Morry Katz