Is monad bind (>>=) operator closer to function composition (chaining) or function application?

Clearly, >>= is not a way to represent function composition. Function composition is simply done with .. However, I don’t think any of the articles you’ve read meant this, either. What they meant was “upgrading” function composition to work directly with “monadic functions”, i.e. functions of the form a -> m b. The technical term … Read more

A monad is just a monoid in the category of endofunctors, what’s the problem?

That particular phrasing is by James Iry, from his highly entertaining Brief, Incomplete and Mostly Wrong History of Programming Languages, in which he fictionally attributes it to Philip Wadler. The original quote is from Saunders Mac Lane in Categories for the Working Mathematician, one of the foundational texts of Category Theory. Here it is in … Read more