HH\Lib\C\reduce_with_key

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

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

namespace HH\Lib\C;

function reduce_with_key<Tk, Tv, Ta>(
    KeyedTraversable<Tk, Tv> $traversable,
  (function(Ta,Tk,Tv):Ta) $accumulator,
  Ta $initial,
): Ta;

Parameters