#"`     None6<DNThis is a generalization of catMaybes as a new function compact. Compact has relations with Functor, Applicative, Monad, Alternative, and Traversable. In that we can use these class to provide the ability to operate on a data type by throwing away intermediate Nothings. This is useful for representing striping out values or failure.:In order to be Compactable, the following law should hold: Kleisli composition /fmapMaybe (l <=< r) = fmapMaybe l . fmapMaybe r=If the data type is also a Functor the following should hold: Functor identity 1 compact . fmap Just = idFunctor identity 2 fmapMaybe Just = idFunctor relation compact = fmapMaybe idAccording to Kmett, (Compactable f, Functor f) is a functor from the kleisli category of Maybe to the category of haskell data types. Kleisli Maybe -> Hask.?If the data type is also Applicative the following should hold: Applicative identity 1 compact . (pure Just  *) = idApplicative identity 2 applyMaybe (pure Just) = idApplicative relation compact = applyMaybe (pure id);If the data type is also a Monad the following should hold:  Monad nameme -bindMaybe (return (Just x)) return = return xMonad identity 1 #flip bindMaybe (return . Just) = idMonad identity 2 "compact . (return . Just =<<) = idMonad relation compact = flip bindMaybe return?If the data type is also Alternative the following should hold: Alternative identity compact empty = emptyAlternative annihilation &compact (const Nothing <$> xs) = empty?If the data type is also Traversable the following should hold: Traversable name me "traverseMaybe (pure . Just) = pureTraversable composition iCompose . fmap (traverseMaybe f) . traverseMaybe g = traverseMaybe (Compose . fmap (traverseMaybe f) . g)Traversable name me *traverse f = traverseMaybe (fmap Just . f)Traversable naturality +t . traverseMaybe f = traverseMaybe (t . f)If you know of more useful laws, or have better names for the ones above (especially those marked "name me"). Please let me know.           *Compactable-0.1.0.2-BZq7hqJ2WSxH42919w6XrzControl.Compactable Compactablecompact fmapMaybe applyMaybe bindMaybe traverseMaybe fforMaybefilter fmapMaybeM fforMaybeM applyMaybeM bindMaybeMtraverseMaybeM$fCompactableEither$fCompactableConst$fCompactableVector$fCompactableSeq$fCompactableMap$fCompactableIntMap$fCompactableCompose$fCompactableProduct$fCompactableReadPrec$fCompactableReadP$fCompactableOption$fCompactableProxy$fCompactableSTM$fCompactableIO$fCompactable[]$fCompactableMaybe