HH\Lib\Math\sum

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

Returns the integer sum of the values of the given Traversable

namespace HH\Lib\Math;

function sum(
  Traversable<int> $traversable,
): int;

For a float sum, see Math\sum_float().

Parameters