From d1736abf827a53dbd88bb2f769b7a226c7bd3fcf Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Thu, 3 Feb 2005 22:59:47 +0000 Subject: [PATCH] A bit clearer for: (SRFI-1 Searching): In list-index, note 0 based index and #f for not found. --- doc/ref/srfi-modules.texi | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index bd2ce922b..f2462b1ac 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -743,14 +743,13 @@ If one of @var{lst1} @dots{} @var{lstN} is empty then no calls to @end deffn @deffn {Scheme Procedure} list-index pred lst1 @dots{} lstN -Call @var{pred} on sets of elements from the @var{lst}s, one from each -list, starting from the first, as @code{(@var{pred} elem1 @dots{} -elemN)}. Return the index of the first set for which @var{pred} -returns true. +Return the index of the first set of elements, one from each of +@var{lst1}@dots{}@var{lstN}, which satisfies @var{pred}. -The index starts from 0 for the first first set of elements. -Searching stops when the end of the shortest @var{lst} is reached. If -no set of elements pass then the return is @code{#f}. +@var{pred} is called as @code{(@var{pred} elem1 @dots{} elemN)}. +Searching stops when the end of the shortest @var{lst} is reached. +The return index starts from 0 for the first set of elements. If no +set of elements pass then the return is @code{#f}. @example (list-index odd? '(2 4 6 9)) @result{} 3