Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having studied abstract algebra before using FP, I must say that I instantly made this connection when I came into contact with monads, and that it helped me a lot to understand them.

So I wouldn't be so quick to dismiss the idea of associating these concepts. After all, category theory is all about making that kind of associations.



This is a good observation. Though, most programmers don't study, and don't have to study, enough abstract algebra before being exposed to promises, optionals, and even lists (which all exhibit some form of monadic behavior).

What worked best for me was both playing with code, reading the definitions in code, and then look up some CT to get to the mathematical roots and where they fit in the intuitive picture. (Then you can continue with arrows, monad transformers, etc.)

Since my primary purpose for learning monads (and other algebraic constructs) was and is their use in programming, I concentrate on "practical" intuitions, and periodically check if I can go down to the algebraic base of them in a particular case. If I still can, I suppose I know enough math to get by in the particular area. If not, I open a book and clarify my understanding, and maybe glean something new.


If you already know category theory, sure, that's fine. (Or maybe if you already know abstract algebra really well.)

I'm going to go out on a limb, though, and speculate that the average person starting to use FP does not already know category theory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: