[plt-scheme] inheriting dynamic extent

From: Robby Findler (robby at cs.uchicago.edu)
Date: Fri Apr 1 21:35:38 EST 2005

At Fri, 1 Apr 2005 21:17:02 -0500, Doug Orleans wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> The dynamic extent of a procedure is the time when processing is
> "inside" a procedure, but it doesn't include the dynamic extent of
> procedures created during this time.  For example:
> 
> ((let ((x 1))
>    (dynamic-wind (lambda () (set! x 2))
>                  (lambda () (lambda () x))
>                  (lambda () (set! x 1)))))
> ; => 1
> 
> Or equivalently:
> 
> ((let ((x 1))
>    (fluid-let ((x 2))
>      (lambda () x))))
> ; => 1
> 
> Is there some way to allow procedures to "inherit" dynamic extent?
> (Or some trick to simulate this?)  In other words, is there a way to
> make something analogous to this example that returns 2 instead of 1?

You might try parameters and the parameterization utilities.

Robby



Posted on the users mailing list.