diff options
Diffstat (limited to 'csc/loop.csc')
| -rw-r--r-- | csc/loop.csc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/csc/loop.csc b/csc/loop.csc index a323495..dbd6200 100644 --- a/csc/loop.csc +++ b/csc/loop.csc @@ -88,12 +88,13 @@ clause* ...))) ((loop-aux "variable-clause-collector" ((body ...) fin) for x = init then subseq clause* ...) (let ((first #t) + (init-value (lambda () init)) ; put the body of init outside the scope of x. (x #f)) (loop-aux "variable-clause-collector" ((body ... (if first (begin (set! first #f) - (set! x init)) + (set! x (init-value))) (set! x subseq))) fin) clause* ...))) |
