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 :: Monoid a => [a] -> ahedgehog Hedgehog.Internal.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 -> ahedgehog Hedgehog.Internal.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 GHC.Prelude.Basic No documentation available.
biconcat :: Bifoldable t => t [a] [a] -> [a]rio RIO.Prelude Reduces a structure of lists to the concatenation of those lists.
Examples
Basic usage:>>> 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 :: Bifoldable t => (a -> [c]) -> (b -> [c]) -> t a b -> [c]rio RIO.Prelude Given a means of mapping the elements of a structure to lists, computes the concatenation of all such lists in order.
Examples
Basic usage:>>> 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]
mconcat :: Monoid a => [a] -> ario RIO.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!"
iconcatMap :: FoldableWithIndex i f => (i -> a -> [b]) -> f a -> [b]diagrams-lib Diagrams.Prelude Concatenate the results of a function of the elements of an indexed container with access to the index. When you don't need access to the index then concatMap is more flexible in what it accepts.
concatMap ≡ iconcatMap . const iconcatMap ≡ ifoldMap
iconcatMapOf :: IndexedGetting i [r] s a -> (i -> a -> [r]) -> s -> [r]diagrams-lib Diagrams.Prelude Concatenate the results of a function of the elements of an IndexedFold or IndexedTraversal with access to the index. When you don't need access to the index then concatMapOf is more flexible in what it accepts.
concatMapOf l ≡ iconcatMapOf l . const iconcatMapOf ≡ ifoldMapOf
iconcatMapOf :: IndexedGetter i s a -> (i -> a -> [r]) -> s -> [r] iconcatMapOf :: IndexedFold i s a -> (i -> a -> [r]) -> s -> [r] iconcatMapOf :: IndexedLens' i s a -> (i -> a -> [r]) -> s -> [r] iconcatMapOf :: IndexedTraversal' i s a -> (i -> a -> [r]) -> s -> [r]
mconcat :: Monoid a => [a] -> aCabal-syntax Distribution.Compat.Prelude No documentation available.
mconcat :: (Monad m, Monoid w) => Stream (Of w) m r -> m (Of w r)streaming Streaming.Prelude 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"} :> ()