示例#1
0
func page40_Exercise_Maps() {
	WordCount := func(s string) map[string]int {
		dict := make(map[string]int)
		for _, word := range strings.Fields(s) {
			dict[word] = dict[word] + 1
		}
		return dict
	}

	wc.Test(WordCount)
}
示例#2
0
func main() {
	wc.Test(WordCount)
}
示例#3
0
func main() {
	wc.Test(ContadorPalabras)
}
示例#4
0
func main() {
	wc.Test(WordCount)
	print("\n")
}
示例#5
0
func main() {
	mytest := "my test one one two test three two one two"
	fmt.Println(WordCount(mytest))
	wc.Test(WordCount)
}
示例#6
0
func Exercise3() {
	wc.Test(wordCount)
}