exercism/go/parallel-letter-frequency/frequency.go
2016-08-13 18:20:14 -05:00

12 lines
141 B
Go

package letter
type FreqMap map[rune]int
func Frequency(s string) FreqMap {
m := FreqMap{}
for _, r := range s {
m[r]++
}
return m
}