Making Sense of Monads
Master Haskell's Biggest Stumbling Block!
Making Sense of Monads
There are probably a thousand blog posts, articles, and videos out there trying to teach what monads are. Some are too simple to really tell you what's going on ("A monad is like a burrito!"). Some are too complicated for anyone who isn't already well versed in abstract math ("A monad is a monoid is the category of endofunctors!").
All of them try to pass on some of the fundamental knowledge. But virtually none of them provide you with the tools you really need to use monads in your own code. For that, you need practical experience that involves writing the code yourself.
Our Making Sense of Monads course is designed to provide just that. In this course, you'll learn:
- Fundamental knowledge about simpler abstract structures that will help you understand monads
- How to understand monadic syntax in Haskell
- How to use all of the most common monads in Haskell
And best of all, you'll get a chance to practice your skills with programming exercises, and some project-based code.
Course Content And Outline
The course content consists of 3 elements:
- Video Lectures
- Screencast Videos
- Programming Exercises
In video lectures, your teacher will introduce the core concepts of the lesson, including an in-depth breakdown of the code you need to implement the feature.
Screencast videos will show these concepts in action, in an IDE, so you can follow along.
Finally, you'll then get the chance to try the concepts for yourself with our detailed programming exercises. These exercises are the most important part of the course! By writing the code and applying the concepts yourself, you'll build up the confidence to use these ideas in your own projects.
This short course consists of roughly three different parts. Here are the different areas you'll cover:
This course starts with an overview of basic functional structures. Monads are a bit tricky to understand as an abstract structure. So we'll start with simpler structures like functors and monoids. We'll learn about their typeclass representations and how different structures can have "laws" associated with them.
The core material of this course is, naturally, learning how to use monads. We'll discuss "What is a Monad", as well as the easiest way to understand monadic syntax. You'll also learn about the most commonly used monads in Haskell and how to combine them together!
The course concludes with two mini-projects centered around parsing. Parsing is a fundamentally stateful (and thus monadic) activity, so it will give you some great practice for your new skills! You'll learn the ins and outs of the Megaparsec library, and get the chance to write a basic JSON parser as well as a parser for a more complicated language format.
For more details, see the full outline and FAQ below!
James is a Software Engineer living in Atlanta, GA. He first discovered Haskell in college, but began using it consistently since 2015. His Haskell experience blends multiple side projects as well as professional work. In late 2016, he began the Monday Morning Haskell blog, where he publishes new Haskell content every week.
Start1: Introduction (5:07)
Preview2: Monoids and Semigroups (4:32)
Start3: Functors (3:59)
Start4: Applicative Functors (4:59)
Start5: Monad Basics (6:43)
Start6: Do Syntax (12:05)
Start7: Reader and Writer Monads (9:17)
Start8: State Monad (4:45)
Start9: IO Monad (7:35)
Start10: File System Operations (13:13)
Start11: Monad Transformers (11:26)
Start12: Monad Laws (8:04)
Start13: Parsing Basics (13:46)
Start14: GEDCOM Parsing Challenge (5:11)
Start15: Conclusion (3:55)