From 5b636d3b4801a150b1ca15c5f51908564dcffebc Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 8 Oct 2010 04:13:46 +0000 Subject: [PATCH] Fix recent change to FLUID-LET to support unassigning. Fixes (define x 0) (fluid-let ((x)) ...) ;The object (), passed as an argument to safe-car, is not a pair. --- src/runtime/mit-macros.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/mit-macros.scm b/src/runtime/mit-macros.scm index bbfe5acb3..461cb8333 100644 --- a/src/runtime/mit-macros.scm +++ b/src/runtime/mit-macros.scm @@ -529,7 +529,7 @@ USA. compare (syntax-check '(KEYWORD (* (FORM ? EXPRESSION)) + FORM) form) (let ((names (map car (cadr form))) - (expressions (map cadr (cadr form))) + (right-hand-sides (map cdr (cadr form))) (r-define (rename 'DEFINE)) (r-lambda (rename 'LAMBDA)) (r-let (rename 'LET)) @@ -539,7 +539,7 @@ USA. (let ((temporaries (map make-synthetic-identifier names)) (swap! (make-synthetic-identifier 'SWAP!)) (body `(,r-lambda () ,@(cddr form)))) - `(,r-let ,(map list temporaries expressions) + `(,r-let ,(map cons temporaries right-hand-sides) (,r-define (,swap!) ,@(map (lambda (name temporary) `(,r-set! ,name (,r-set! ,temporary (,r-set! ,name)))) -- 2.25.1