Say we have this:
func foo() func() int {
return func() {
for i := range [0..10] {
return i
}
}
}
func main() {
for i := foo() {
}
}
Can I iterate over the returned function in a for loop without knowing how many times it will loop?