But the whole promise of monads is precisely that they are a type that can compose.
It basically allows you to pipe successive function calls returning different types by lifting these types into a monad.
Don't get me wrong, that promise is very powerful and in the rare few cases where it works, it unlocks beautiful composition, but the simple truth is that monads are really not that useful outside of Haskell (and I'd say, it's even questionable within).
It basically allows you to pipe successive function calls returning different types by lifting these types into a monad.
Don't get me wrong, that promise is very powerful and in the rare few cases where it works, it unlocks beautiful composition, but the simple truth is that monads are really not that useful outside of Haskell (and I'd say, it's even questionable within).