摘要:
package main import ( "strings" "fmt") // 返回各个单词数量统计的map func WordCount(s string) map[string]int { m := make(map[string] int) for _, word := range str 阅读全文
摘要:
package main import "fmt" // fibonacci 函数会返回一个返回 int 的函数。func fibonacci() func() int { a , b:= 0, 1 return func() int { defer func() { a, b = b, a+b } 阅读全文