extra-1.7.14: Extra functions I use.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Monoid.Extra

Description

Extra functions for working with monoids.

Synopsis

Documentation

Extra operations

mwhen :: Monoid a => Bool -> a -> a Source #

Like when, but operating on a Monoid. If the first argument is True returns the second, otherwise returns mempty.

mwhen True  "test" == "test"
mwhen False "test" == ""