diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2003-02-03 14:48:25 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2003-02-03 14:48:25 +0000 |
commit | f9ac1c2df8b712ecb2a44dc5771d90c1ef3cc352 (patch) | |
tree | 8ec43bbd04a4f8fd96089d7f32f1622924ef230c /srfi/srfi-1.c | |
parent | 07a68d543f8cbe9a86309177f84723299ce68580 (diff) | |
download | guile-f9ac1c2df8b712ecb2a44dc5771d90c1ef3cc352.tar.gz |
* srfi-1.c (srfi1_for_each): Corrected argument checking for the
case of two argument lists. (Thanks to Kevin Ryde.)
Diffstat (limited to 'srfi/srfi-1.c')
-rw-r--r-- | srfi/srfi-1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/srfi/srfi-1.c b/srfi/srfi-1.c index 35e9bc389..afd3e78bc 100644 --- a/srfi/srfi-1.c +++ b/srfi/srfi-1.c @@ -1,6 +1,6 @@ /* srfi-1.c --- SRFI-1 procedures for Guile * - * Copyright (C) 2002 Free Software Foundation, Inc. + * Copyright (C) 2002, 2003 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -175,7 +175,7 @@ scm_srfi1_map (SCM proc, SCM arg1, SCM args) && len >= 0 && len2 >= -1, g_srfi1_map, scm_cons2 (proc, arg1, args), - len2 >= 0 ? SCM_ARG3 : SCM_ARG2, + len2 >= 0 ? SCM_ARG2 : SCM_ARG3, s_srfi1_map); while (len > 0) { @@ -245,10 +245,10 @@ scm_srfi1_for_each (SCM proc, SCM arg1, SCM args) if (len < 0 || (len2 >= 0 && len2 < len)) len = len2; SCM_GASSERTn ((SCM_NULLP (arg2) || SCM_CONSP (arg2)) - && len >= 0 && len2 < len, + && len >= 0 && len2 >= -1, g_srfi1_for_each, scm_cons2 (proc, arg1, args), - len2 >= 0 ? SCM_ARG3 : SCM_ARG2, + len2 >= 0 ? SCM_ARG2 : SCM_ARG3, s_srfi1_for_each); while (len > 0) { |