8
$\begingroup$

I'm a developer and have become fixated on functional programming due to its expressivity. I have begun learning Haskell but have reached a very significant wall when trying to comprehend functors, monads, monoids and applicative functors. Currying, lambdas, and function composition all make sense to me, but the concept of a Monad is not that intuitive. I have taken a semester's worth of Discrete mathematics: this book, which covers some set theory (which from some reading I guess a set is a category, and a morphism is a mapping function). I have also read Learn you a Haskell.

My question is simply, from a programmer's / pseudo-mathematician perspective, what is the best introductory text to category theory (or to the topics I mentioned above) that will allow me to understand these concepts and expound upon my understanding if need be later on?

$\endgroup$
4
  • $\begingroup$ Maybe this q/a could be helpful for understanding monads. $\endgroup$
    – Petr
    Nov 14 '12 at 7:06
  • 5
    $\begingroup$ This isn't an answer, just a warning: if you look up monads in a book on category theory it won't be obvious which part corresponds to how monads are used in computer science. Historically monads were used to talk about their algebras (en.wikipedia.org/wiki/…) but as far as I can tell, in computer science what's more important is actually their Kleisli categories (en.wikipedia.org/wiki/Kleisli_category). This point tripped me up for awhile when I was trying to learn something about Haskell. $\endgroup$ Nov 14 '12 at 7:06
  • 3
    $\begingroup$ Maybe Barr and Wells, Category theory for computer science is useful. However, they only treat the very basics of monads (called triples in that book). Wadler wrote extensively about monads, the two papers Comprehending monads and Monads for functional programming look quite promising from their abstracts. Finally, the nlab page dedicated to monads in Computer Science. $\endgroup$
    – commenter
    Nov 14 '12 at 12:37
  • $\begingroup$ My advice is category theory is really hard and wont help you program haskell at all. IF you just want to learn a bit of category theory having some haskell will help and you can watch TheCatsters on youtube. $\endgroup$
    – user58512
    Jan 20 '13 at 18:33
6
$\begingroup$

I know this is a really old question, but in case anyone is still looking Category Theory for Programmers is really good (I found this question while I was googling for that very blog post series). It does a good job of introducing category theory concepts along with motivating applications for programming (with examples in Haskell and C++).

$\endgroup$
1
  • 1
    $\begingroup$ There is a very nice pdf version (including tex sources) on github $\endgroup$ Oct 15 '17 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.