Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]
Array

Method Array.reduce()


Method reduce

mixed Array.reduce(function fun, array arr, mixed|void zero)

Description

reduce() sends the first two elements in arr to fun , then the result and the next element in arr to fun and so on. Then it returns the result. The function will return zero if arr is the empty array. If arr has only one element, that element will be returned.

See also

rreduce()