(define-macro (bind-existing-identifier ID)
#'(begin
(define ID 42)
(* ID 2)))
(bind-existing-identifier foo) ; 84
foo ; 42 (and `foo` has module scope)
(let ()
(bind-existing-identifier bar)
bar) ; 42 (and `bar` has expression scope)
bar ; unbound identifier
1
2
3
4
5
6
7
8
9
10
11
12 | (define-macro (bind-existing-identifier ID)
#'(begin
(define ID 42)
(* ID 2)))
(bind-existing-identifier foo) ; 84
foo ; 42 (and `foo` has module scope)
(let ()
(bind-existing-identifier bar)
bar) ; 42 (and `bar` has expression scope)
bar ; unbound identifier
|