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?

  • 0
    Maybe [this q/a](http://programmers.stackexchange.com/q/161568/61231) could be helpful for understanding monads.2012-11-14
  • 5
    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_ (http://en.wikipedia.org/wiki/Monad_(category_theory)#Algebras_for_a_monad) but as far as I can tell, in computer science what's more important is actually their _Kleisli categories_ (http://en.wikipedia.org/wiki/Kleisli_category). This point tripped me up for awhile when I was trying to learn something about Haskell.2012-11-14
  • 3
    Maybe Barr and Wells, [Category theory for computer science](http://www.cwru.edu/artsci/math/wells/pub/ctcs.html) is useful. However, they only treat the very basics of monads (called triples in that book). Wadler [wrote extensively](http://homepages.inf.ed.ac.uk/wadler/topics/monads.html) 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](http://ncatlab.org/nlab/show/monad+%28in+computer+science%29).2012-11-14
  • 0
    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.2013-01-20

1 Answers 1