Parser type isn’t the only type that supports
flatMap operations. There are many types that can be transformed in similar ways, and even the Swift standard library and Apple frameworks ship with many examples. This collection of episodes explores this topic deeply, and hopes to empower you to define these operations on your own types as well.
Now that we’ve seen that parsers have
flatMap operations, it’s time to take things to the next level and explore a whole bunch of what are commonly called “parser combinators”: or “higher-order” functions that enhance and combine parsers in more and more interesting, complex ways.