[functional-tests] fluid-let is already in (chezscheme)
This commit is contained in:
parent
02618e39d1
commit
0740cb7bcc
@ -2,8 +2,7 @@
|
||||
(utils)
|
||||
(export inc!
|
||||
dec!
|
||||
swap!
|
||||
fluid-let)
|
||||
swap!)
|
||||
(import (rnrs))
|
||||
|
||||
(define-syntax inc!
|
||||
@ -22,16 +21,4 @@
|
||||
(let ((tmp x))
|
||||
(set! x y)
|
||||
(set! y tmp)))))
|
||||
|
||||
(define-syntax fluid-let
|
||||
(syntax-rules ()
|
||||
((_ ((x e)) b1 b2 ...)
|
||||
(let ((y e))
|
||||
(let ((swap (lambda ()
|
||||
(let ((t x))
|
||||
(set! x y)
|
||||
(set! y t)))))
|
||||
(dynamic-wind swap (lambda ()
|
||||
b1 b2 ...)
|
||||
swap))))))
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user