
11 Apr
2019
11 Apr
'19
5:49 a.m.
On Wed, 10 Apr 2019, James Ashwell wrote:
This would mimic the behaviour of Control.Monad.when for monoids rather than applicatives.
mwhen :: Monoid m => Bool -> m -> m mwhen b a | b = a | otherwise = mempty
https://hackage.haskell.org/package/utility-ht-0.0.14/docs/Data-Monoid-HT.ht...