data-extra-1.0.0: Extra utilities for working on Data.* types.

Safe HaskellSafe-Inferred

Data.Maybe.Extra

Description

Extra functions for dealing with Maybe.

Synopsis

Documentation

whenMaybe :: Monad m => Bool -> m a -> m (Maybe a)Source

When the predicate is true, return maybe the action's return value.