12 lines
204 B
Go
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
|
|
}
|