21 lines
354 B
Plaintext
21 lines
354 B
Plaintext
|
|
func callMe(i) {
|
|
println("i is now", i)
|
|
}
|
|
|
|
func main(start, end) {
|
|
var counter = start
|
|
while (counter < end) {
|
|
callMe(counter)
|
|
counter = counter + 1
|
|
}
|
|
|
|
// Go down again using while 1 + break
|
|
while (1) {
|
|
counter = counter - 1
|
|
if (counter < start)
|
|
break
|
|
callMe(counter)
|
|
}
|
|
}
|