mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 14:21:10 +02:00
(SRFI-1 Length Append etc): Add count.
This commit is contained in:
parent
004fe2c802
commit
e508c8630c
1 changed files with 14 additions and 0 deletions
|
@ -381,6 +381,20 @@ first containing the first elements of each lists and the second
|
||||||
containing the second elements of each lists, and so on.
|
containing the second elements of each lists, and so on.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn {Scheme Procedure} count pred lst1 @dots{} lstN
|
||||||
|
Return a count of the number of times @var{pred} returns true when
|
||||||
|
called on elements from the given lists.
|
||||||
|
|
||||||
|
@var{pred} is called with @var{N} parameters @code{(@var{pred}
|
||||||
|
@var{elem1} @dots{} @var{elemN})}, each element being from the
|
||||||
|
corresponding @var{lst1} @dots{} @var{lstN}. The first call is with
|
||||||
|
the first element of each list, the second with the second element
|
||||||
|
from each, and so on.
|
||||||
|
|
||||||
|
Counting stops when the end of the shortest list is reached. At least
|
||||||
|
one list must be non-circular.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
|
||||||
@node SRFI-1 Fold and Map
|
@node SRFI-1 Fold and Map
|
||||||
@subsection Fold, Unfold & Map
|
@subsection Fold, Unfold & Map
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue