January 2020
Intermediate to advanced
470 pages
11h 13m
English
In Chapter 4, Behaving Properly – Pure Functions, we considered the case of the Fibonacci function and learned how we could transform it, by hand, into a much more efficient version by means of memoization: caching calculated values to avoid recalculations. A memoized function is one that will avoid redoing a process if the result was found earlier. We want to be able to turn any function into a memoized one so that we can get a more optimized version.