list::reduce — Reduces a list to a single value.
flex1
list::reduce
( | flex1 x , |
flex2 y , | |
flex1 value , | |
list<flex2> list , | |
block<flex1>
expression
) ; |
Apply expression cumulatively to the values of the list, from left to right, to reduce the list to a single value. See http://en.wikipedia.org/wiki/Reduce_(higher-order_function) for a detailed explanation.
In this version the initial value is explicitly provided. Thus the list can be empty. Also the return type can be different from the type of the list.