This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]