Returns a collector that returns the sum of all entries in the Iterable based on the selector function.
Type of items in the source.
Collector that returns the sum of all entries in the Iterable based on the selector function.
const result = sumBy((x) => x)([1, 2, 3]);console.log(result); // 6 Copy
const result = sumBy((x) => x)([1, 2, 3]);console.log(result); // 6
Returns a collector that returns the sum of all entries in the Iterable based on the selector function.