exercism/go/accumulate/accumulate.go

12 lines
204 B
Go
Raw Normal View History

2017-08-15 14:55:28 +00:00
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
}