21 lines
221 B
Scheme
21 lines
221 B
Scheme
|
(begin
|
||
|
|
||
|
(define foo (lambda (a)
|
||
|
(lambda ()
|
||
|
a)))
|
||
|
(define bar (foo 1))
|
||
|
|
||
|
; must be 1
|
||
|
(write (bar))
|
||
|
(newline)
|
||
|
|
||
|
(define baz (foo 2))
|
||
|
|
||
|
; must be 2
|
||
|
(write (baz))
|
||
|
(newline)
|
||
|
|
||
|
; must be 1
|
||
|
(write (bar))
|
||
|
(newline))
|