Different ways to see a monad
While learning Haskell I have faced a lot of tutorials trying to explain what are monads and why monads are important in Haskell. Each of them used analogies so it would be easier to catch the meaning.
At the end of the day, I have end up with 3 differents view of what a monad is:
Critique of the IO monad being viewed as a state monad operating on the world
The IO
monad in Haskell is often explained as a state monad where the state is the world. So a value of type IO a
monad is viewed as something like worldState -> (a, worldState)
.
Futures/Monads vs Events
In an application framework
when performance impact can be ignored (10-20 events per second at max),
what is more maintainable and flexible to use as a preferred medium for communication between modules – Events or Futures/Promises/Monads?
What monad is the opposite of the error monad in haskell
In the error monad, the first failure halts any execution further just carrying the fault through any following binds.
Better to use error monad with validation in your monadic functions, or implement your own monad with validation directly in your bind?
I’m wondering what’s better design wise for usability/maintainability, and what’s better as far as fitting with the community.
Is this a monad in Java? (part 2)
My first try was on stackoverflow. I’m picking up on the answer there to improve my monad: StackOverflow – Is this a monad in Java?
Why doesn’t monad take `(M a -> M b)`?
All apologies — I’m still very much on the outside of Haskell looking in.
Why doesn’t monad take `(M a -> M b)`?
All apologies — I’m still very much on the outside of Haskell looking in.
Why doesn’t monad take `(M a -> M b)`?
All apologies — I’m still very much on the outside of Haskell looking in.
Why doesn’t monad take `(M a -> M b)`?
All apologies — I’m still very much on the outside of Haskell looking in.