Double your monad in 30 days

Albert Lai trebla@vex.net
05 Mar 2002 16:43:01 -0500


Ashley Yakeley <ashley@semantic.org> writes:

> Prelude> 0 * 2
> 0

We can generalize this.

import Monad

double_your_monad_in_30_days :: (MonadPlus M) => M a
double_your_monad_in_30_days = mzero `mplus` mzero