Summary

This chapter focused on ways of composing functions and types. We saw that Functor, Applicative, Arrow and Monad all fall on a spectrum of generality, with Monad being the most powerful type.

We also found how different the historical development of these types were from their natural order in the abstraction hierarchy. This explained the redundancies in type-class methods across these types.

In the next chapter, we'll explore how folding and traversing (something we're very used to when working with lists) can be generalized to Applicative and Monad. To get to the heart of folding, we'll take a good look at the very simple and powerful Monoid type and see how intricately it is related to folding over data types.

We'll also learn about functional lenses and see how they relate to traversing ad hoc data structures.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset