Why is there no monad instance for Control.Applicative.Const ? Is the following definition correct or violates its monad laws?
instance Monoid a => Monad (Const a) where return _ = Const mempty (Const x) >>= _ = Const x
And can you come up with some useful app?
haskell monads
Landei
source share