The text associated with delay and force in the R5.97RS (and the R5RS, 
for that matter) talks about "a value" rather than "values". 
Nevertheless, I see no reason why force should not deliver multiple 
values to its continuation. In the context of the example implementation 
given in R5.97RS, I would suggest the following definition of make-promise:

(define make-promise
   (lambda (proc)
     (let ((results #f))
       (lambda ()
         (apply values
                (or results
                    (let ((x (call-with-values proc list)))
                      (if (not results)
                          (set! results x))
                      results)))))))

With this, the following:

(call-with-values (lambda () (force (delay (values 0 1 2)))) list)

gives (0 1 2) rather than (0).

Regards,

Alan

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to