This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
fluid-binding again
- From: Wen-Chun Ni <wcn at tbcommerce dot com>
- To: Kawa List <kawa at sources dot redhat dot com>
- Date: Fri, 2 May 2003 17:21:25 -0700
- Subject: fluid-binding again
Hi,
Seems fluid-let stops working again.
(let ((x 3)
(y 4))
(let ((f (lambda () (+ x y))))
(fluid-let ((x 1) (y 2))
(f))))
should return 3 but returns 7 again. If we use
(define x 3)
(define y 4)
(let ((f (lambda () (+ x y))))
(fluid-let ((x 1) (y 2))
(f)))
The answer is right.
After examining the bytecode of the former example, the initialization
of the variables x and y inside the fluid-let got called immediately
after setting the literals instead of before calling f.
Thanx!
Wen-Chun Ni