In Chapter 12, Implementing Design Patterns - The Functional Way, we have gone over many ways of using functions to achieve different results, and in this chapter, we will go more deeply into data types from a functional point of view. We'll be considering ways of actually implementing our own data types, with several features to help composing operations or ensuring purity, so your FP coding will become actually simpler and shorter. We'll be touching on several themes:
- Data types from a functional point of view, because even though JavaScript is not a typed language, a better understanding of types and functions are needed
- Containers, including functors and the mystifying monads, to better structure data flow
- Functions as structures, in which we'll see yet another way of using functions to represent data types, with immutability thrown in as an extra