Conversation started Jun 1, 2014 at 12:46.
Jun 1, 2014 12:46
>>= is statement chaining
because the code operating in a context has to keep it somehow
you specify how the operations are going to be chained
>>= can pass state behind the scenes, but it can do much mode
that's the essence of "programmable semicolon"
I even wrote a paragraph about that I think.
> If this was in Maybe Monad, if any of the operations that obtain values failed, resulting in Nothing, the whole function would automatically result in Nothing. The context, being responsible for chaining operations, is able to “look inside” their returned values and change behaviour according to them. There are some laws that dictate what operations are possible, to keep the program’s behavior reasonable, but nevertheless it still offers a lot of possibilities.
and for completeness/utility >> is >>= that discards the return value to chain a computation that doesn't want the return value of the previous function.
-----
at least that's from the practical perspective. Of course `>>=` has a more formal definition, the one that @Cat wrote.
but to understand all that, you need to really read into what do notation is, what Monad laws are, etc. etc. and it doesn't really help in understanding how the hell that applies to anything.
 
Conversation ended Jun 1, 2014 at 12:51.