exercism/go/etl/etl.go
2016-08-13 18:20:14 -05:00

18 lines
388 B
Go

package etl
import "strings"
// Transform takes the legacy data structure
// and converts it into the new and improved
// data structure oh man this new system will
// make us so rich you guys.
func Transform(input map[int][]string) map[string]int {
ret := make(map[string]int)
for k, v := range input {
for _, let := range v {
ret[strings.ToLower(let)] = k
}
}
return ret
}