Functional Parsers and Monads

Course subject(s) Module 07. Functional Parsers and Monads

No one can follow the path towards mastering functional programming without writing their own parser combinator library. We start by explaining what parsers are and how they can naturally be viewed as side-effecting functions. Next we define a number of basic parsers and higher-order functions for combining parsers.

Note: The full version of the code presented in this lecture can be found at this link.

Monads

In the previous videos we have mentioned the fact that a Parser is actually an instance of a Monad.

Graham Hutton provides a clear and comprehensive explanation of Monads and their power at this link. You are supposed to read this and then proceed to the exercises.

Warning: reading and understanding this document is necessary in order to succesfully complete the exercises in this and the following chapters. In the EULA we will double check that you really did read this additional material.

Creative Commons License
Introduction to Functional Programming by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://ocw.tudelft.nl/courses/introduction-to-functional-programming/.
Back to top