Cycle loops, when I increment i
by the function, but no via i++
.
package main
import "fmt"
func increment(i int) (int) {
i++
return i
}
func condition_true(i int) (bool) {
if i < 10 {
return true
} else {
return false
}
}
func main() {
for i := 1; condition_true(i); increment(i) {
fmt.Println(i)
}
}