ludovic.courtes_at_laas.fr (Ludovic Court?s) writes:
> Section 7.2.6 of the manual does not explicitly mention how
> `call-with-port' should behave if PROC returns multiple times. For
> instance, is the following a valid implementation of `call-with-port'?
>
> (define (call-with-port port proc)
> (dynamic-wind
> (lambda ()
> #t)
> (lambda ()
> (proc port))
> (lambda ()
> (close-port port))))
Yes.
> If it is, I would suggest adding a few words saying that once the
> dynamic extent of PROC has been left, PORT is closed even if it is
> eventually re-entered.
R5.92RS does say:
>> If proc returns, then the port is closed automatically and the
>> values returned by proc are returned.
Could you be more specific as to why this isn't clear?
--
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
Received on Fri Feb 23 2007 - 12:19:22 UTC