exercism/go/accumulate/accumulate.go
2017-08-15 09:55:28 -05:00

12 lines
204 B
Go

package accumulate
const testVersion = 1
func Accumulate(vals []string, f func(string) string) []string {
ret := make([]string, len(vals))
for i := range vals {
ret[i] = f(vals[i])
}
return ret
}