data-extra-1.0.0: Extra utilities for working on Data.* types.
Data.Maybe.Extra
Description
Extra functions for dealing with Maybe.
Synopsis
whenMaybe :: Monad m => Bool -> m a -> m (Maybe a)Source
When the predicate is true, return maybe the action's return value.