Changed (append (map f l) e) => (map* e f l)
authorStephen Adams <edu/mit/csail/zurich/adams>
Mon, 17 Apr 1995 03:40:28 +0000 (03:40 +0000)
committerStephen Adams <edu/mit/csail/zurich/adams>
Mon, 17 Apr 1995 03:40:28 +0000 (03:40 +0000)
v8/src/compiler/midend/applicat.scm

index 9e7d839f7d4e8fcee0f497edf5df7b4319073c48..4fff487009828dd45128c046cf8b7e224f2758ba 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: applicat.scm,v 1.3 1995/03/12 05:57:14 adams Exp $
+$Id: applicat.scm,v 1.4 1995/04/17 03:40:28 adams Exp $
 
 Copyright (c) 1994 Massachusetts Institute of Technology
 
@@ -57,10 +57,10 @@ MIT in each case. |#
 
 (define-applicator LAMBDA (env lambda-list body)
   `(LAMBDA ,lambda-list
-     ,(applicat/expr (append (map (lambda (name)
-                                   (list name false))
-                                 (lambda-list->names lambda-list))
-                            env)
+     ,(applicat/expr (map* env
+                          (lambda (name)
+                            (list name false))
+                          (lambda-list->names lambda-list))
                     body)))
 
 (define-applicator QUOTE (env object)
@@ -113,14 +113,11 @@ MIT in each case. |#
         (let* ((lambda-list (cadr rator))
                (rator* `(LAMBDA ,lambda-list
                           ,(applicat/expr
-                            (append
-                             (map (lambda (name rand)
-                                    (list name
-                                          (and (pair? rand)
-                                               (eq? (car rand) 'LAMBDA))))
-                                  lambda-list
-                                  rands)
-                             env)
+                            (map env
+                                 (lambda (name rand)
+                                   (list name (LAMBDA/? rand)))
+                                 lambda-list
+                                 rands)
                             (caddr rator)))))
           `(CALL ,(applicat/remember rator* rator)
                  ,(applicat/expr env cont)
@@ -134,22 +131,21 @@ MIT in each case. |#
                      (applicat/expr env (cadr binding))))
              bindings)
      ,(applicat/expr
-       (append (map (lambda (binding)
-                     (list (car binding)
-                           (let ((value (cadr binding)))
-                             (LAMBDA/?  value))))
-                   bindings)
-              env)
+       (map* env
+            (lambda (binding)
+              (list (car binding)
+                    (let ((value (cadr binding)))
+                      (LAMBDA/?  value))))
+            bindings)
        body)))
 \f
 (define-applicator LETREC (env bindings body)
-  (let ((env*
-        (append (map (lambda (binding)
-                       (list (car binding)
-                             (let ((value (cadr binding)))
-                               (LAMBDA/? value))))
-                     bindings)
-                env)))
+  (let ((env*  (map* env
+                    (lambda (binding)
+                      (list (car binding)
+                            (let ((value (cadr binding)))
+                              (LAMBDA/? value))))
+                    bindings)))
     `(LETREC ,(map (lambda (binding)
                     (list (car binding)
                           (applicat/expr env* (cadr binding))))