From: Guillermo J. Rozas Date: Mon, 1 Mar 1993 17:40:20 +0000 (+0000) Subject: Make DEFINE-MULTIPLE return the value returned by the last definition. X-Git-Tag: 20090517-FFI~8437 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=cff3f9905c4837a9891052b38cec17a4ed09bf09;p=mit-scheme.git Make DEFINE-MULTIPLE return the value returned by the last definition. --- diff --git a/v7/src/runtime/make.scm b/v7/src/runtime/make.scm index 70fa668bc..7afef06e8 100644 --- a/v7/src/runtime/make.scm +++ b/v7/src/runtime/make.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: make.scm,v 14.43 1993/02/25 03:20:22 gjr Exp $ +$Id: make.scm,v 14.44 1993/03/01 17:40:20 gjr Exp $ Copyright (c) 1988-1993 Massachusetts Institute of Technology @@ -52,11 +52,13 @@ MIT in each case. |# (not (= (vector-length names) (vector-length values)))) (error "define-multiple: Invalid arguments" names values) (let ((len (vector-length names))) - (do ((i 0 (1+ i))) - ((>= i len) 'done) - (local-assignment env - (vector-ref names i) - (vector-ref values i))))))) + (let loop ((i 0) (val unspecific)) + (if (>= i len) + val + (loop (1+ i) + (local-assignment env + (vector-ref names i) + (vector-ref values i))))))))) ;; This definition is replaced later in the boot sequence. diff --git a/v8/src/runtime/make.scm b/v8/src/runtime/make.scm index 70fa668bc..7afef06e8 100644 --- a/v8/src/runtime/make.scm +++ b/v8/src/runtime/make.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: make.scm,v 14.43 1993/02/25 03:20:22 gjr Exp $ +$Id: make.scm,v 14.44 1993/03/01 17:40:20 gjr Exp $ Copyright (c) 1988-1993 Massachusetts Institute of Technology @@ -52,11 +52,13 @@ MIT in each case. |# (not (= (vector-length names) (vector-length values)))) (error "define-multiple: Invalid arguments" names values) (let ((len (vector-length names))) - (do ((i 0 (1+ i))) - ((>= i len) 'done) - (local-assignment env - (vector-ref names i) - (vector-ref values i))))))) + (let loop ((i 0) (val unspecific)) + (if (>= i len) + val + (loop (1+ i) + (local-assignment env + (vector-ref names i) + (vector-ref values i))))))))) ;; This definition is replaced later in the boot sequence.