Appears in 2 boards

Monad’s `join` (flattening structure) in action
Monad as a generalization of concat, with the ability to collapse/merge structure

Appears in 2 boards

Difference in using `Applicative` or `Monad` functions in sequences
Aris Goudouras
This is probably the difference between using `apS` and `bind` in fp-ts.
Binding in the context of Monads
Kleisli Composition (that accounts for structure) in Monads
`mapM` as a special case of `traverse`

Appears in 2 boards

When you are trying to explain what a monad is to a Haskell programmer, how do you explain? It’s like, well, there is the Maybe Monad. Well, okay. And there’s the List Monad. Okay. And there’s the Continuation Monad. It’s like your fingers sticking out of water, right? Each finger is separate. Where is the hand? So, the way that I finally tried to explain monad is that it’s in composition. You are trying to compose things and there is this new way of composing things that is different. It’s sort of like composing functions, right? But these are not simple functions. These are functions that return some funny stuff, right? And how do you compose functions that return funny stuff? They accept normal stuff, but they return something that’s weird. […] There is something miraculous that happens with monads. The question is like, how come that all these weird effects that you can think of, they have all the explanations in terms of functions returning some functor? Why is it so? Whether it’s IO or maybe or list. Bartosz Milewski, https://haskell.foundation/podcast/30/, 32:07