Building Better Containers - Functional Data Types

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:

  • Data types from a functional point of view. Even though JavaScript is not a typed language, a better understanding of types and functions is needed.
  • Containers, including functors and the mystifying monads, to structure data flow.
  • Functions as structures ...

Get Mastering JavaScript Functional Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.