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
-- 
[EMAIL PROTECTED]
OpenPGP 0xD9D50D8A

Attachment: signature.asc
Description: Digital signature

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to