category-theory

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

谁都会走 提交于 2019-11-26 16:50:14
Who first said the following? A monad is just a monoid in the category of endofunctors, what's the problem? And on a less important note, is this true and if so could you give an explanation (hopefully one that can be understood by someone who doesn't have much Haskell experience)? Tom Crockett 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

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

五迷三道 提交于 2019-11-26 09:45:31
问题 In many articles I have read that monad >>= operator is a way to represent function composition. But for me it is closer to some kind of advanced function application ($) :: (a -> b) -> a -> b (>>=) :: Monad m => m a -> (a -> m b) -> m b For composition we have (.) :: (b -> c) -> (a -> b) -> a -> c (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c Please clarify. 回答1: Clearly, >>= is not a way to represent function composition . Function composition is simply done with . . However, I

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

大城市里の小女人 提交于 2019-11-26 04:56:55
问题 Who first said the following? A monad is just a monoid in the category of endofunctors, what\'s the problem? And on a less important note, is this true and if so could you give an explanation (hopefully one that can be understood by someone who doesn\'t have much Haskell experience)? 回答1: 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