This commit is contained in:
Yuichi Nishiwaki 2013-12-03 22:29:35 +09:00
parent d9398828c0
commit 708af9f00f
1 changed files with 8 additions and 8 deletions

View File

@ -607,16 +607,16 @@
(lambda (expr use-env mac-env)
(let ((wrapped '()))
(define (inject obj)
(let ((s (make-syntactic-closure use-env '() obj)))
(set! wrapped (acons s obj wrapped))
s))
(let ((s (make-syntactic-closure use-env '() obj)))
(set! wrapped (acons s obj wrapped))
s))
(define (extract obj)
(let ((t (assq obj wrapped)))
(if t (cdr t) obj)))
(let ((t (assq obj wrapped)))
(if t (cdr t) obj)))
(define (wrap expr)
(walk inject expr))
(walk inject expr))
(define (unwrap expr)
(walk extract expr))
(walk extract expr))
(define (compare x y)
(identifier=? use-env x use-env y))
(identifier=? use-env x use-env y))
(make-syntactic-closure mac-env '() (unwrap (f (wrap expr) inject compare))))))