# Monads

## Synopsis

Monads are a famous feature of the Haskell programming language, and
have started to find their way in many other languages as well. In this
period we’ll cover type classes, which provide the abstraction necessary
for monads (and many other things). Then we’ll cover the functor type
class, which allows us to define a `map`

-like function for any type we
want. Finally, we’ll cover monads themselves.

One feature about monads is that they inspire programmers to write blog
posts and tutorials about them. For the most part, they tell you more
about the state of mind that that particular programmer had when monads
finally “clicked” than about monads themselves. The article below, *You
could have invented monads*, is a refreshing change, and I recommend you
read it, even before watching my video.

## Videos

## Handouts

## Further Reading

- The Typeclassopedia Yes, this was linked from the Typeclass lecture.
- You could have invented monads This blog post walks through how monads may have been "discovered" by a normal programmer.
- Monads for Functional Programming This paper talks about writing an interpreter and adding abilities simply by changing which monad we give to it.
- Functors, Applicatives, and Monads in Pictures
- A monad is a monoid in the category of endofunctors, what's the problem?] That phrase is something you will hear from time to time about the link between Category Theory and Haskell monads. This article explains the math behind it if you are interested. As the <a href="https://www.unix.com/what-is-on-your-mind-/108501-line-2238-unix-v6-comment-you-not-expected-understand.html">comments</a> in the Unix V6 source code say, "you are not expected to understand this".