Back to Lo

Core Mean

docs/data/core-mean.md

1.53.0136 B
Original Source

Calculates the arithmetic mean of a collection of numbers. Returns 0 for an empty collection.

go
lo.Mean([]int{2, 3, 4, 5})
// 3