示例#1
0
 /**
  * reduceLeft - ReduceLeft is like reduce, but it is used for combining values into values of the same type.  This is perfect for things like
  * summing values, concatenating strings, union arrays, etc.
  *
  * @param callable $fn($prevValue, $currentValue, $currentKey) -- The $fn predicate is a function(T $prevValue, T $currentValue) that returns type T|null.
  * @return mixed
  */
 public function reduceLeft($fn)
 {
     return IterationTraits::reduceLeft($this, $fn);
 }