moved exercises beneath common package

This commit is contained in:
Stephen M. McQuay
2012-08-02 15:24:14 -06:00
parent 67df1d93dc
commit b9967d888d
3 changed files with 0 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package main
import (
"code.google.com/p/go-tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
wc := make(map[string]int)
for _, v := range strings.Fields(s) {
wc[v] += 1
}
return wc
}
func main() {
wc.Test(WordCount)
}