this post was submitted on 27 Mar 2024
42 points (87.5% liked)
Functional Programming
1408 readers
1 users here now
founded 2 years 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.)