incorrect MonadPlus law "v >> mzero = mzero"?
wren ng thornton
winterkoninkje at gmail.com
Thu Feb 6 01:01:02 UTC 2014
On Wed, Feb 5, 2014 at 7:59 PM, wren ng thornton
<winterkoninkje at gmail.com> wrote:
> The rules I'd expect MonadPlus to obey are:
>
> mzero >>= f = mzero
>
> (x `mplus` y) >> mzero = (x >> mzero) `mplus` (y >> mzero)
Er, sorry, that should've been:
(x `mplus` y) >> z = (x >> z) `mplus` (y >> z)
from which the above instance follows trivially.
--
Live well,
~wren
More information about the Libraries
mailing list