[bitc-dev] Capture problem with by-ref
Pierre THIERRY
nowhere.man at levallois.eu.org
Tue Mar 11 10:08:18 EDT 2008
Scribit Jonathan S. Shapiro dies 11/03/2008 hora 09:09:
> (define (outer x:'a)
> (define (capture xc:(by-ref 'a))
> (lambda (y)
> (pair y, x)))
>
> Note that "x" is in the call frame of OUTER, it is aliased by "xc", "xc"
> is in turn captured by the lambda, and the lambda escapes.
I miss to see where xc aliases x. The way I read it, capture is a
procedure defined in the lexical scope of outer, and its only argument's
type is a BY-REF of the type of outer's only argument.
I would see a capture in the following definition of outer:
(define (outer x:'a)
(define (capture xc:(by-ref 'a))
(lambda (y)
(pair y x)))
(capture x))
Did I miss something?
Curiously,
Pierre
--
nowhere.man at levallois.eu.org
OpenPGP 0xD9D50D8A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.coyotos.org/pipermail/bitc-dev/attachments/20080311/00909c89/attachment.bin
More information about the bitc-dev
mailing list