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