HH\Lib\C\reduce

This API is part of the Hack Standard Library, not HHVM itself.

Reduces the given Traversable into a single value by applying an accumulator function against an intermediate result and each value

namespace HH\Lib\C;

function reduce<Tv, Ta>(
  Traversable<Tv> $traversable,
  (function(Ta,Tv):Ta) $accumulator,
  Ta $initial,
): Ta;

Parameters