there are functions as follows
package main
import "fmt"
func intSeq () func () int {
i := 0
return func() int {
i += 1
return i
}
}
func main () {
nextInt := intSeq()
fmt.Println(nextInt())
fmt.Println(nextInt())
fmt.Println(nextInt())
newInts := intSeq()
fmt.Println(newInts())
}
in intSeq (), is the I in the anonymous function the same as the I in the external environment? Or is the external I in the stack and the I of the anonymous function in the heap?