15 lines
280 B
Scheme
15 lines
280 B
Scheme
|
#lang scheme
|
||
|
|
||
|
; https://github.com/munificent/craftinginterpreters/blob/master/test/closure/reuse_closure_slot.lox
|
||
|
|
||
|
((lambda ()
|
||
|
(define f #f)
|
||
|
((lambda ()
|
||
|
(define a 1)
|
||
|
(define (f_) (display a))
|
||
|
(set! f f_)))
|
||
|
|
||
|
((lambda ()
|
||
|
(define b 2)
|
||
|
(f)))))
|