Venkat Subramaniam gave a nice talk about Java tail recursion. https://www.youtube.com/watch?v=4tEi86h8-TM&feature=youtu.be&t=32m30s This repo shows the code that he is talking about.