Details
-
Wish
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.1-beta-2
-
None
-
None
Description
Detect and convert tail recursion into a while loop:
#!/usr/bin/env groovy
def my_while(test, action) {
if (test()) action()
else return true
my_while(test, action)
}
count = 0;
my_test = {
return count < 1000000
}
my_while(my_test) {
count++
}
println "made it!"
Attachments
Issue Links
- is depended upon by
-
GROOVY-753 complete parser
- Closed