Recap

Recursions are a valuable tool in programming, but a simple implementation of recursion is often not useful for practical problems. Functional interfaces, lambda expression, and infinite Streams can help us design tail-call optimization to make recursions feasible in such cases. Furthermore, we can combine recursions and memoization to make execution of overlapping recursions really fast.

In the next chapter we’ll explore a practical example that employs lambda expressions and then we’ll parallelize it with little effort.

Get Functional Programming in Java 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.