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
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss