
14 Feb
2012
14 Feb
'12
10:24 a.m.
If you are going to add one then the generalization of your generalization to Alternative might be better.
maybeA = maybe empty pure
On Feb 14, 2012, at 9:55 AM, Jeff Shaw
I find myself using this function quite a lot. I believe it should be included in Data.Maybe.
import Control.Monad
maybeTo :: (MonadPlus m) => Maybe a -> m a maybeTo = maybe mzero return
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries