Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mconcat_ :: (Monad m, Monoid w) => Stream (Of w) m r -> m wstreaming Streaming.Prelude No documentation available.
data
MconcatSym0 (a1 :: TyFun [a] a)singletons-base Prelude.Singletons No documentation available.
type family
MconcatSym1 (a6989586621680307190 :: [a]) :: asingletons-base Prelude.Singletons No documentation available.
-
singletons-base Prelude.Singletons No documentation available.
-
singletons-base Prelude.Singletons No documentation available.
-
singletons-base Prelude.Singletons No documentation available.
mconcat :: Monoid a => [a] -> anumhask NumHask.Prelude 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!"
sconcat :: Semigroup a => NonEmpty a -> anumhask NumHask.Prelude Reduce a non-empty list with <> The default definition should be sufficient, but this can be overridden for efficiency.
Examples
For the following examples, we will assume that we have:>>> 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
mconcat :: Monoid a => [a] -> aghc-lib-parser GHC.Prelude.Basic 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!"
mconcat :: Monoid a => [a] -> arebase Rebase.Prelude 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!"