map -package:containers -package:blaze-html -package:bytestring -package:conduit -package:amazonka-core -package:base-prelude -package:imports -package:base -package:basement -package:dense-linear-algebra -package:insert-ordered-containers -package:Cabal-syntax -package:hedgehog -package:case-insensitive -package:filepath package:pipes

Apply a function to all values flowing downstream
map id = cat

map (g . f) = map f >-> map g
Apply a function to all values flowing downstream, and forward each element of the result.
Apply a monadic function to all values flowing downstream
mapM return = cat

mapM (f >=> g) = mapM f >-> mapM g
Consume all values using a monadic function
(mapMaybe f) yields Just results of f. Basic laws:
mapMaybe (f >=> g) = mapMaybe f >-> mapMaybe g

mapMaybe (pure @Maybe . f) = mapMaybe (Just . f) = map f

mapMaybe (const Nothing) = drain
As a result of the second law,
mapMaybe return = mapMaybe Just = cat