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

I was like if m in mX is a monad, how is m not a function? Or if it is a function, how is it different from functions in general?

Googling, I found the following helpful comment:

"...while addition and multiplication are both monoids over the positive natural numbers, a monad is a monoid object in a category of endofunctors: return is the unit, and join is the binary operation. It couldn't be more simple. If that confuses you, it might be helpful to see a Monad as a lax functor from a terminal bicategory"



Wait, I think I may have found a good explanation:

"A few months ago Brent Yorgey complained about a certain class of tutorials which present monads by explaining how monads are like burritos.

At first I thought the choice of burritos was only a facetious reference to the peculiar and sometimes strained analogies these tutorials make. But then I realized that monads are like burritos."

https://blog.plover.com/prog/burritos.html




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

Search: