reduce[procedure] reduce f ridentity list
SRFI-1: reduce has the following definition:
If list = (), return ridentity;
Otherwise, return (fold f (car list) (cdr list)).
...in other words, we compute (fold f ridentity list).
Note: MIT Scheme and Haskell flip F's arg order
for their reduce and fold functions.
See also fold, reduce-right.
[syntax] reduce ((sequence-type element-var data ...) ...) ((state-var initial) ...) body [final]
Scheme48's reduce is a macro for looping.
See iterate.
|