HH\Lib\Math\sum

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

This function is available as Math\sum() in Facebook's www repository.

Returns the integer sum of the values of the given Traversable

Description

namespace HH\Lib\Math;

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

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

Parameters