reduce() public static method

Boils down a list of values to a single value.
public static reduce ( array $data, callable $cb, mixed $memo ) : mixed
$data array Data.
$cb callable Function to reduce values.
$memo mixed Initial value.
return mixed Result.
 /**
  *	Filters a value through a set of functions.
  *
  *	@param mixed $value Value.
  *	@param array $filters Filters.
  *	@return mixed Filtered value.
  */
 private function filter($value, array $filters)
 {
     return Traverse::reduce($filters, new Execute(), $value);
 }
 /**
  *
  */
 public function testReduce()
 {
     $data = [1, 2];
     $closure = $this->closure([[0, 1, 0, 1], [1, 2, 1, 3]]);
     $expected = 3;
     $this->assertEquals($expected, Traverse::reduce($data, $closure, 0));
 }