Understanding recursion
Recursion can be understood at several different levels. A simplistic understanding involves knowing the definition of recursion. A method that calls itself is recursive. This understanding is not particularly useful.
Another level of understanding is being able to take a recursive algorithm and implement it using recursion. This is often a fairly direct process, and can be performed without truly understanding recursion.
A mathematical understanding occurs when one can clearly see how the recursive invocation works at a functional level and how local variables are handled. This is an important level of understanding to achieve where one is better able to create and maintain recursive application.
A more complete understanding ...
Get Learning Java Functional Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.