[GitHub] groovy pull request #808: Documentation for @TailRecursive

2018-10-10 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/808


---


[GitHub] groovy pull request #808: Documentation for @TailRecursive

2018-10-10 Thread PascalSchumacher
Github user PascalSchumacher commented on a diff in the pull request:

https://github.com/apache/groovy/pull/808#discussion_r224093386
  
--- Diff: src/spec/doc/core-metaprogramming.adoc ---
@@ -1985,7 +1985,19 @@ _protectedCacheSize>0_ would create an unlimited 
cache with some results protect
 [[xform-TailRecursive]]
 = `@groovy.transform.TailRecursive`
 
-TBD
+The `@TailRecursive` annotation can be used to automatically transform a 
recursive call in the end of a method to an
+iterative version of the same code, to avoid stack overflow due to to many 
recursive calls. Below is an example of
--- End diff --

`to to many` should be `to too many` I guess.


---


[GitHub] groovy pull request #808: Documentation for @TailRecursive

2018-10-09 Thread JacobAae
GitHub user JacobAae opened a pull request:

https://github.com/apache/groovy/pull/808

Documentation for @TailRecursive

Added a test with an example and included it in the language documentation 
with some of the limitations of the annotation

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/JacobAae/groovy master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/808.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #808


commit eca6d7b457959c13e9059663b392fb7c28ffdce3
Author: Jacob Aae Mikkelsen 
Date:   2018-10-09T12:07:16Z

Documentation for @TailRecursive




---