>>> concat (Just [1, 2, 3]) [1,2,3]
>>> concat (Left 42) []
>>> concat [[1, 2, 3], [4, 5], [6], []] [1,2,3,4,5,6]
>>> concat [[1,2,3], [4,5], [6], []] [1,2,3,4,5,6]
>>> concat [] []
>>> concat [[42]] [42]
>>> concatMap (take 3) [[1..], [10..], [100..], [1000..]] [1,2,3,10,11,12,100,101,102,1000,1001,1002]
>>> concatMap (take 3) (Just [1..]) [1,2,3]
concatMap f xs == (concat . map f) xs
>>> concatMap (\i -> [-i,i]) [] []
>>> concatMap (\i -> [-i, i]) [1, 2, 3] [-1,1,-2,2,-3,3]
>>> concatMap ('replicate' 3) [0, 2, 4] [0,0,0,2,2,2,4,4,4]
>>> mconcat ["Hello", " ", "Haskell", "!"] "Hello Haskell!"
>>> biconcat ([1, 2, 3], [4, 5]) [1,2,3,4,5]
>>> biconcat (Left [1, 2, 3]) [1,2,3]
>>> biconcat (BiList [[1, 2, 3, 4, 5], [6, 7, 8]] [[9]]) [1,2,3,4,5,6,7,8,9]
>>> biconcatMap (take 3) (fmap digitToInt) ([1..], "89") [1,2,3,8,9]
>>> biconcatMap (take 3) (fmap digitToInt) (Left [1..]) [1,2,3]
>>> biconcatMap (take 3) (fmap digitToInt) (Right "89") [8,9]
>>> import Data.List.NonEmpty (NonEmpty (..))
>>> sconcat $ "Hello" :| [" ", "Haskell", "!"] "Hello Haskell!"
>>> sconcat $ Just [1, 2, 3] :| [Nothing, Just [4, 5, 6]] Just [1,2,3,4,5,6]
>>> sconcat $ Left 1 :| [Right 2, Left 3, Right 4] Right 2