mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add small_config.yml for testing
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
12
utils/sums.go
Normal file
12
utils/sums.go
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user