From cff3f9905c4837a9891052b38cec17a4ed09bf09 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Mon, 1 Mar 1993 17:40:20 +0000 Subject: [PATCH] Make DEFINE-MULTIPLE return the value returned by the last definition. --- v7/src/runtime/make.scm | 14 ++++++++------ v8/src/runtime/make.scm | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) 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. -- 2.25.1