News for hackers. Stuff that matters.
Re:Haskell Concepts in One Sentence by alok-g on Sunday March 26, 2017 @01:57AM (#13959440)
I haven't read/understood your full comment as yet. I've gotten stuck on the first sentence itself: "A monad refers to a class of data structures which implement bind":

Perhaps you mean that a data structure like a list which implements bind is a monad.

Based on what I am reading in your overall comment, a monad is not a class of data structures which implement bind. I italicized keywords which I found problematic in your first statement, noting that you used refers to, and not is. (It is likely that I am confused, but have been missing a clear definition of a monad like "a monad is ...". If the definition involves more terms needing definitions, a topological sort would help. :-)

Re:Haskell Concepts in One Sentence by mrkgnao on Sunday March 26, 2017 @05:33AM (#13959930)
Well, a monad is parameterized over a type (so Maybe is the monad, not Maybe a -- or State s, Writer w, and so on), so GP could be said to have a point: Monad (with a capital m) is the (type)class of datatypes which do all those things.

But, honestly (my silly rules-lawyering aside), a monad "is" an endofunctor and two particular nice natural transformations that satisfy some coherence conditions. This is at the other extreme of the pedagogical utility/clarity scale, since it is the final (if opaque) answer to any definitional ambiguity.

Functors and applicative functors precede monads in (pretentious cough) modern Haskell pedagogy, as championed by the (thankfully non-pretentious) Learn You A Haskell, as well as the Haskell Wikibook. Reading the relevant chapters is a good start. :)

http://learnyouahaskell.com/

https://en.wikibooks.org/wiki/Haskell

Re:Haskell Concepts in One Sentence by scottmsul on Sunday March 26, 2017 @02:09AM (#13959468)
Thanks, I changed the first sentence, hopefully it's less confusing.