January 2020
Intermediate to advanced
470 pages
11h 13m
English
We want to have wrapped values, so what exactly should return the map() method? If we want to be able to chain operations, then the only logical answer is that it should return a new wrapped object. In true functional style, when we apply a mapping to a wrapped value, the result will be another wrapped value that we can keep working on.
We can extend our Container class to implement this change and get ourselves an enhanced container: a functor. The ...