November 2017
Intermediate to advanced
386 pages
9h 22m
English
Back in Chapter 4, Behaving Properly - Pure Functions, we considered the case of the Fibonacci function and saw how we could transform it, by hand, into a much more efficient version by means of memoization: caching calculated values, to avoid recalculations. For simplicity, let's now only consider functions with a single, non-structured parameter, and leave for later functions with more complex parameters (objects, arrays) or more than one parameter for later.