Proposal: Add Alternative adapter to Data.Monoid

Mario Blažević mblazevic at stilo.com
Fri Oct 31 21:02:44 UTC 2014


> instance Alternative t => Monoid (Alt t a) where
>    mempty = Alt empty
>    (Alt m) `mappend` (Alt n) = Alt (m <|> n)

+1




More information about the Libraries mailing list