[gambit-list] Dynamic bindings?
Marc Feeley
feeley at iro.umontreal.ca
Tue Mar 4 17:56:08 EST 2008
On 4-Mar-08, at 4:59 PM, David St-Hilaire wrote:
> Is there a way to get some dynamic scoping in gambit? I tried to use
> the make-parameter and parameterize forms, but I guess I didn't
> understood them because it didn't work out...
>
> I'd like to do something like:
>
> (define (f) (dynamic-let ((x)) x))
>
> (let ((x 10))
> (f))
>
> --> 10
(define x (make-parameter #f))
(define (f) (pp (x)))
(parameterize ((x 10))
(f))
Marc
More information about the Gambit-list
mailing list