From c1ab7397548fc4d52b3e6abba646dd7daafef7dc Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Thu, 5 Aug 2004 00:10:22 +0000 Subject: [PATCH] (SRFI-13 Predicates): Tweak wording for clarity. For string-every, note return is #t when no characters. For string-any and string-every, note last pred call is not currently a tail call, contrary to SRFI-13 spec. --- doc/ref/srfi-modules.texi | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index cecb1664a..88bdb7a83 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -1357,20 +1357,28 @@ which are already in the Guile core, the string predicates @deffn {Scheme Procedure} string-any pred s [start end] Check if the predicate @var{pred} is true for any character in -the string @var{s}, proceeding from left (index @var{start}) to -right (index @var{end}). If @code{string-any} returns true, -the returned true value is the one produced by the first -successful application of @var{pred}. +the string @var{s}. + +Calls to @var{pred} are made from left to right across @var{s}. When +it returns true (ie.@: non-@code{#f}), that return value is the return +from @code{string-any}. @end deffn @deffn {Scheme Procedure} string-every pred s [start end] Check if the predicate @var{pred} is true for every character -in the string @var{s}, proceeding from left (index @var{start}) -to right (index @var{end}). If @code{string-every} returns -true, the returned true value is the one produced by the final -application of @var{pred} to the last character of @var{s}. +in the string @var{s}. + +Calls to @var{pred} are made from left to right across @var{s}. If +the predicate is true for every character then the return value from +the last @var{pred} call is the return from @code{string-every}. + +If there are no characters in @var{s} (ie.@: @var{start} equals +@var{end}) then the return is @code{#t}. @end deffn +The SRFI-13 specification requires that the call to @var{pred} on the +last character of @var{s} (assuming that point is reached) be a tail +call, but currently in Guile this is not the case. @c ===================================================================