[Haskell-cafe] Funny State monad dependency
haberg at math.su.se
Wed Apr 16 10:08:09 EDT 2008
On 16 Apr 2008, at 15:14, Miguel Mitrofanov wrote:
> Before somebody noticed: I'm wrong.
> It's not List monad, but also a "(->) x" monad, also defined in
> Therefore, "return y" is just "const y". Therefore,
> x >>= (return y) = x >>= (const y) = x >> y
Right. It is an interesting monad, but it may cause unexpected
effect, in view of its implicit name.
More information about the Haskell-Cafe