1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/utils/sums.go
Chris Cummer 1686c9a6a9 Add small_config.yml for testing
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-13 22:33:28 -08:00

13 lines
173 B
Go

package utils
// SumInts takes a slice of ints and returns the sum of them
func SumInts(vals []int) int {
sum := 0
for _, a := range vals {
sum += a
}
return sum
}