>>=
is statement chaining
Conversation started Jun 1, 2014 at 12:46.
Jun 1, 2014 12:46
> 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.
Conversation ended Jun 1, 2014 at 12:51.
Explaining >>=
Jun '141
Haskell
Haskell. We endorse Alex' attempts to learn Haskell.
Participants
- Bartek Banachewicz 100%
all times are UTC