@ 1e3679e075694dda43bb3b82dd39f993c8e7705a | history
; Scope is lexical: a function sees the bindings where it was written, ; not where it is called. (define x 1) (define f (lambda () x)) (define g (lambda (x) (f))) (g 2) ;=> 1 (define x 2) ;=! immutable ((lambda (x) (define y (+ x 1)) (define z (+ y 1)) z) 1) ;=> 3 ((lambda () (define a (lambda () (b))) (define b (lambda () 1)) (a))) ;=! unbound