| fluid-let-1.scm - Illustration of the use of fluid-let for temporary reassignment of relatively global variables. | Lecture 1 - slide 45 : 49 Program 1 |
(let ((a 10) (b 11) (c 12) (d 13))
(letrec ((g (lambda ()
(+ a b c d)))
)
(list
(g)
(fluid-let ((a 1) (b 2) (c 3) (d 4)) ; in this fluid-let a is temporarily assigned
(g)) ; to 1, b to 2, c to 3, and d to 4.
(g)
)
)
)
; (46 10 46)