this post was submitted on 27 Mar 2024
41 points (87.3% liked)
Functional Programming
1393 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I've recently come to appreciate monads as 2-arrows from the terminal object in a 2-category; quoting nLab:
This is a nifty demystification of the data of a monad. Why do endofunctors tend to carry monads? Because endofunctors on categories
C
tend to be expressible as endomorphisms in 2-categories whereC
is an object! Since this latter condition is typically trivial, it follows that endofunctors onC
typically carry monads (and that any counterexamples depend on the structure ofC
and choice of 2-category.)