mconcat

Fold a list using the monoid. For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.
>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"
Fold all values within a container using mappend and mempty
Fold streamed items into their monoidal sum
>>> S.mconcat $ S.take 2 $ S.map (Data.Monoid.Last . Just) S.stdinLn
first<Enter>
last<Enter>
Last {getLast = Just "last"} :> ()
Fold a stream of monoid elements by appending them.
mconcat = Stream.fold Fold.mconcat
Pre-release
Fold a list using the monoid. For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.
Monoid concat. Fold an input stream consisting of monoidal elements using mappend and mempty. Definition:
>>> mconcat = Fold.sconcat mempty
>>> monoids = fmap Data.Monoid.Sum $ Stream.enumerateFromTo 1 10

>>> Stream.fold Fold.mconcat monoids
Sum {getSum = 55}
Examples:
>>> :{
let foo :: Tensored (,) () '[Bool, Int]
foo = Tensored (True, (8, ()))
:}
>>> :{
let bar :: Tensored Either Void '[Bool, Int]
bar = Tensored $ Right $ Left 8
:}
>>> :{
let baz :: Tensored These Void '[Bool, Int]
baz = Tensored $ These True $ This 8
:}
A version of mconcatMap that works with a monadic predicate.
Version on concatMap generalised to a Monoid rather than just a list.
mconcatMap Sum [1,2,3] == Sum 6
\f xs -> mconcatMap f xs == concatMap f xs
Defaults to mconcatMap m k = foldr (mappend . k) mempty m
This function differs from the original mconcat. See recMempty.
Set a form's concatenation function.
Generic mconcat
Concatenate a list of elements, inserting separators between them.