Node:SRFI1 Fold and Map, Next:SRFI1 Filtering and Partitioning, Previous:SRFI1 Length Append etc, Up:SRFI1
fold kons knil lst1 lst2 ...  Scheme Procedure 
Fold the procedure kons across all elements of lst1,
lst2, .... Produce the result of
if enm are the elements of the lists lst1, lst2, .... 
foldright kons knil lst1 lst2 ...  Scheme Procedure 
Similar to fold , but applies kons in righttoleft order
to the list elements, that is:

pairfold kons knil lst1 lst2 ...  Scheme Procedure 
Like fold , but apply kons to the pairs of the list
instead of the list elements.

pairfoldright kons knil lst1 lst2 ...  Scheme Procedure 
Like foldright , but apply kons to the pairs of the list
instead of the list elements.

reduce f ridentity lst  Scheme Procedure 
reduce is a variant of reduce . If lst is
() , ridentity is returned. Otherwise, (fold (car
lst) (cdr lst)) is returned.

reduceright f ridentity lst  Scheme Procedure 
This is the foldright variant of reduce.

unfold p f g seed [tailgen]  Scheme Procedure 
unfold is defined as follows:
(unfold p f g seed) = (if (p seed) (tailgen seed) (cons (f seed) (unfold p f g (g seed))))
g produces a series of seed values, which are mapped to list elements by f. These elements are put into a list in lefttoright order, and p tells when to stop unfolding. 
unfoldright p f g seed [tail]  Scheme Procedure 
Construct a list with the following loop.
(let lp ((seed seed) (lis tail)) (if (p seed) lis (lp (g seed) (cons (f seed) lis))))

map f lst1 lst2 ...  Scheme Procedure 
Map the procedure over the list(s) lst1, lst2, ... and return a list containing the results of the procedure applications. This procedure is extended with respect to R5RS, because the argument lists may have different lengths. The result list will have the same length as the shortest argument lists. The order in which f will be applied to the list element(s) is not specified. 
foreach f lst1 lst2 ...  Scheme Procedure 
Apply the procedure f to each pair of corresponding elements of the list(s) lst1, lst2, .... The return value is not specified. This procedure is extended with respect to R5RS, because the argument lists may have different lengths. The shortest argument list determines the number of times f is called. f will be applied to the list elements in lefttoright order. 
appendmap f lst1 lst2 ...  Scheme Procedure 
appendmap! f lst1 lst2 ...  Scheme Procedure 
Equivalent to
(apply append (map f clist1 clist2 ...)) and
(apply append! (map f clist1 clist2 ...)) Map f over the elements of the lists, just as in the The dynamic order in which the various applications of f are made is not specified. 
map! f lst1 lst2 ...  Scheme Procedure 
Linearupdate variant of map  map! is allowed, but not
required, to alter the cons cells of lst1 to construct the
result list.
The dynamic order in which the various applications of f are made is not specified. In the nary case, lst2, lst3, ... must have at least as many elements as lst1. 
pairforeach f lst1 lst2 ...  Scheme Procedure 
Like foreach , but applies the procedure f to the pairs
from which the argument lists are constructed, instead of the list
elements. The return value is not specified.

filtermap f lst1 lst2 ...  Scheme Procedure 
Like map , but only results from the applications of f
which are true are saved in the result list.
