top | item 31979217

(no title)

eddyschai | 3 years ago

Maybe if I explain what a Monad is in Plain English it'll help you understand functors?

A monad is just a monoid in the category of endofunctors.

discuss

order

the_only_law|3 years ago

The closest I've come to understanding Monads was funny enough, the Wikipedia page (ok so there's at least two pages on Wikipedia for Monads, one in a category theory context, and one in a more general programming context, the latter I could actually begin to grasp). It wasn't overly full of vocabulary from category theory, nor did it try to compare it to taco bell menu items.

IncRnd|3 years ago

If I may also quote!

A monad is a special kind of a functor. A functor F takes each type T and maps it to a new type FT. A burrito is like a functor: it takes a type, like meat or beans, and turns it into a new type, like beef burrito or bean burrito.

mypalmike|3 years ago

I think you need to explain endofunctors.

An endofunctor is the category containing monoids such as the monad.*

*This is probably wrong. Please don't explain.

eddyschai|3 years ago

So in all seriousness a functor is a mapping from one category to another, and an endofunctor is a mapping from one category to the same category.