

Lazy Recursion in Java with Streams - akud
https://akudlick.wordpress.com/2015/07/03/lazy-recursion-in-java-with-streams/

======
rostov
I am not sure about Java, but in C, C++ function's stack's memory is not
allocated on the heap and has much more limited space. So any elegant solution
involving recursion is bound to hit memory limit pretty quickly and one has to
watch out for the size of recursed data structure.

