[Haskell-cafe] maybeToM

Tomasz Zielonka tomasz.zielonka at gmail.com
Mon Dec 18 11:42:40 EST 2006

On Mon, Dec 18, 2006 at 09:29:24AM +0000, Joachim Breitner wrote:
> dons mentions in his blog post that Data.Map???s lookup is generalized
> over the Monads, whereas Prelude.maybe isn???t. Are there good reasons not
> to do that to Prelude.maybe as well?

I can't see how such a generalization could look like, especially since
"maybe" can be used with arbitrary monad:
    maybe (fail "Nothing") return

Best regards

More information about the Haskell-Cafe mailing list