In this chapter, you learned how to deal with parsing data using both applicative and monadic style parsing. Haskell’s type system and ecosystem make it particularly well suited to building parsers, and you’ll notice the patterns that you used throughout this chapter pop up regularly when you are writing Haskell code. In fact, it’s not a stretch to say that Haskell programmers will often try to turn problems into a parsing problem in many cases, because the techniques we’ve developed in this chapter are so handy that it’s always a good idea to see if we can use them when we’re presented with some new problem.

This chapter has also served as an example of how to take the work you’ve done so far in this book, learning about many of the existing values with Monad and Applicative instances, and extend them to your own problems, leveraging the power of these type classes for expressing your own unique computations.

In the next chapter, we’ll continue building on these ideas by looking at how you can move on from defining a single Applicative or Monad instance that defines the behavior of some type and instead start defining types through the composition of effects from several different Monad instances.