Fix bug in 1d-table/alist, and add 1d-table/for-each.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Fri, 15 Sep 1989 17:18:08 +0000 (17:18 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Fri, 15 Sep 1989 17:18:08 +0000 (17:18 +0000)
v7/src/runtime/prop1d.scm
v7/src/runtime/version.scm

index ea832f2935ba1498033914a9457aeb9cfd4592ac..7f326043752a08413c682f8af5d19aed9a6a86e8 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/prop1d.scm,v 14.3 1989/06/06 22:28:51 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/prop1d.scm,v 14.4 1989/09/15 17:16:35 jinx Rel $
 
 Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
@@ -142,4 +142,21 @@ MIT in each case. |#
                  (loop previous next result))
                (loop alist
                      next
-                     (cons (cons key (system-pair-cdr entry)) result))))))))
\ No newline at end of file
+                     (cons (cons (and (not (eq? key false-key)) key)
+                                 (system-pair-cdr entry))
+                           result))))))))
+
+(define (1d-table/for-each proc table)
+  (let loop ((previous table) (alist (cdr table)))
+    (if (not (null? alist))
+       (let ((entry (car alist))
+             (next (cdr alist)))
+         (let ((key (system-pair-car entry)))
+           (if key
+               (begin
+                 (proc (and (not (eq? key false-key)) key)
+                       (system-pair-cdr entry))
+                 (loop alist next))
+               (begin
+                 (set-cdr! previous next)
+                 (loop previous next))))))))
\ No newline at end of file
index 12d60334fd5e9ca6a246ecbda21298205a875886..9918bd271f0e5d34fdcb42af6f84fafc11f25d98 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.56 1989/08/18 19:15:16 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.57 1989/09/15 17:18:08 jinx Exp $
 
 Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
@@ -45,7 +45,7 @@ MIT in each case. |#
                     '()))
   (add-system! microcode-system)
   (add-event-receiver! event:after-restore snarf-microcode-version!)
-  (add-identification! "Runtime" 14 56))
+  (add-identification! "Runtime" 14 57))
 (define microcode-system)
 
 (define (snarf-microcode-version!)