handball/src/test/run-pass/closure/reuse-closure-slot.scm

16 lines
288 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)))))