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

Stray Birds



   Date: Mon, 1 Mar 93 19:59:14 PST
   From: kend@newton.apple.com (Ken Dickey)

   At  7:56 PM 93/03/01 -0500, Guillermo J. Rozas wrote:
   >I haven't used the HL macros, but what is wrong with the following
   >(besides "exporting" define-values-helper) as a _reference_
   >implementation
   >
   >(define-syntax DEFINE-VALUES
   >  (syntax-rules
   >   ()
   >   ((define-values (<name> ...) <body> ...)
   >    (begin
   >      (define <name> #f) ...
   >      (call-with-values
   >       (lambda () <body> ...)
   >       (lambda all-the-values
   >         (define-values-helper all-the-values <name> ...)))))))

   My recollection is that the receiver in a call-with-values form has to
   accept the exact number of values returned by the thunk.  I certainly think
   that it *should* be the rule...  Anyone?

   -Ken                              kend@newton.apple.com


It does accept them.  It accepts any number!

I think the agreement was that the implicit application in
call-with-values should be no more or no less strict than the
application in a procedure call.

Thus, since lambda expressions with symbols for argument lists
generate procedures that take any number of arguments, the
continuation created by call-with-values above should be able to
accept any number of values.