Chapter 7: Recursion and Memoization

This chapter introduces two software design concepts, recursion and memoization, and demonstrates how they can be operationalized within the FCMP procedure. A recursive function is one that repeatedly calls itself, and in doing so, decomposes a larger problem into a simpler one. When a recursive function finally terminates and stops calling itself, the final solution is returned to the calling program. Both user-defined functions and subroutines can be designed to be recursive, but not all functionality can be achieved through recursion. The aim of recursion is typically to simplify software design and improve readability, as opposed to increasing performance or efficiency.

Memoization, on the other hand, ...

Get PROC FCMP User-Defined Functions 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.