In this chapter, we looked at the theory of data types and learned how to use and implement them from a functional point of view. We started with how to define function signatures to help us understand the transformations that are implied by the multiple operations we looked at later. Then, we went on to define several containers, including functors and monads, and saw how they can be used to enhance function composition. Finally, we learned how functions can be directly used by themselves, with no extra baggage, to implement functional data structures to simplify dealing with errors.
In this book, we have looked at several features of functional programming for JavaScript. We started out with some definitions, and a practical example, and then moved on to important considerations such as pure functions, side effects avoidance, immutability, testability, building...