[r6rs-discuss] Promises and Multiple Values
Eli,
Thanks for the pointer to SRFI-45. I like your simpler version, although
it does still contains a closure. For posterity, here is a cleaned-up
and tested version:
(define make-promise
(lambda (x)
(lambda ()
(if (procedure? x)
(let ((r (call-with-values x list)))
(if (procedure? x)
(set! x r))))
(apply values x))))
All of this is probably moot, though, as I suspect the R5RS
compatibility library is intended to be bug-compatible with the R5RS.
Regards,
Alan
Received on Mon Jul 23 2007 - 17:27:04 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC