[plt-scheme] inheriting dynamic extent

From: Joe Marshall (jrm at ccs.neu.edu)
Date: Mon Apr 4 12:44:44 EDT 2005

> On Apr 1, 2005, at 9:17 PM, Doug Orleans wrote:
>> Is there some way to allow procedures to "inherit" dynamic extent?


Matthias Felleisen <matthias at ccs.neu.edu> writes:

> I believe you want to "close" your value with the current state:
>
>   {(let ((x 1))
>      (fluid-let ((x 2))
>        (close (lambda () x)))}
>
> In my mind, (close e) = (let ((a a) ...) e) for all a in fv(e)


You have rediscovered dynamic closures (as previous seen on the Lisp
machine).

> Would this give you what you really want? -- Matthias

That's a different question.  In certain contexts, dynamic closures
are the tool you want.



Posted on the users mailing list.