From a08a19bed1a4da882b3f89de08b7199933ca8f82 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 9 Feb 2014 03:15:50 +0900 Subject: [PATCH] cosmetic changes --- piclib/built-in.scm | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/piclib/built-in.scm b/piclib/built-in.scm index 2dcaade4..680b0e16 100644 --- a/piclib/built-in.scm +++ b/piclib/built-in.scm @@ -280,14 +280,19 @@ (lambda (form r compare) (let ((bindings (cadr form)) (body (cddr form))) - (let ((vars (map car bindings))) + (let ((vars (map car bindings)) + (gensym (lambda (var) + (string->symbol + (string-append + "parameterize-" + (symbol->string var)))))) `(,(r 'let) (,@(map (lambda (var) - `(,(r var) (,var))) + `(,(r (gensym var)) (,var))) vars)) ,@bindings (,(r 'let) ((,(r 'result) (begin ,@body))) ,@(map (lambda (var) - `(,(r 'parameter-set!) ,var ,(r var))) + `(,(r 'parameter-set!) ,var ,(r (gensym var)))) vars) ,(r 'result)))))))) @@ -680,14 +685,14 @@ (define-library (scheme cxr) (import (scheme base)) - (define (caaar p) (car (caar p))) - (define (caadr p) (car (cadr p))) - (define (cadar p) (car (cdar p))) - (define (caddr p) (car (cddr p))) - (define (cdaar p) (cdr (caar p))) - (define (cdadr p) (cdr (cadr p))) - (define (cddar p) (cdr (cdar p))) - (define (cdddr p) (cdr (cddr p))) + (define (caaar p) (car (caar p))) + (define (caadr p) (car (cadr p))) + (define (cadar p) (car (cdar p))) + (define (caddr p) (car (cddr p))) + (define (cdaar p) (cdr (caar p))) + (define (cdadr p) (cdr (cadr p))) + (define (cddar p) (cdr (cdar p))) + (define (cdddr p) (cdr (cddr p))) (define (caaaar p) (caar (caar p))) (define (caaadr p) (caar (cadr p))) (define (caadar p) (caar (cdar p)))