留给注释了:
package main import "fmt" func fibona() func() int{ i, j := 1, 1 return func() int{ i, j = j , j+i return i } } func main() { fibonaa := fibona() fmt.Println("sssssssss = ", fibona()) for i:= 1; i <10; i++ { fmt.Println("i = ", i, "num = ", fibonaa()) } }