Solution
= Solution
Map over the optional payload, preserving failure:
``
mapMaybe :: (a -> b) -> Maybe a -> Maybe b
mapMaybe _ Nothing = Nothing
mapMaybe f (Just x) = Just (f x)
``
This is the optional-value mapping operation, equivalent to `fmap` for `Maybe`. The question's local name is distinct from the library function `Data.Maybe.mapMaybe`, which filters and maps an entire <list>. The <algebraic data type> keeps absence separate from every ordinary payload value.