In Chapter 11, Implementing Design Patterns – The Functional Way, we went over how to use functions to achieve different results. In this chapter, we will look at data types from a functional point of view. We'll be considering how we can implement our own data types, along with several features that can help us compose operations or ensure their purity so that our FP coding will become simpler and shorter.
We'll be touching on several themes:
- Containers, including functors and the mystifying monads, to 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...