16 lines
413 B
Scheme
16 lines
413 B
Scheme
; https://github.com/munificent/craftinginterpreters/blob/master/test/closure/shadow_closure_with_local.lox
|
|
; TODO: Forbid this https://discordapp.com/channels/571040468092321801/618895179343986688/925533402592079912
|
|
|
|
(define (displayln x)
|
|
(display x)
|
|
(newline))
|
|
|
|
((lambda ()
|
|
(define foo 0)
|
|
(define (f)
|
|
((lambda ()
|
|
(displayln foo)
|
|
(define foo 1)
|
|
(displayln foo))))
|
|
(f)))
|