@@ -232,7 +232,7 @@ module Streamly.Prelude.Internal
232 -- ** Nested Streams
232 -- ** Nested Streams
233 , concatMapM
233 , concatMapM
234 , concatMap
234 , concatMap
235− , K.concatMapBy
235+ , concatMapWith
236 -- , interposeBy
236 -- , interposeBy
237 -- , intercalate
237 -- , intercalate
@@ -2056,11 +2056,31 @@ mergeAsyncByM f m1 m2 = K.mkStream $ \st stp sng yld -> do
2056-- Nesting
2056-- Nesting
2057------------------------------------------------------------------------------
2057------------------------------------------------------------------------------
2059+-- | @concatMapWith merge map stream@ is a two dimensional looping combinator.
2060+-- The first argument specifies a merge or concat function that is used to
2061+-- merge the streams generated by applying the second argument i.e. the @map@
2062+-- function to each element of the input stream. The concat function could be
2063+-- 'serial', 'parallel', 'async', 'ahead' or any other zip or merge function
2064+-- and the second argument could be any stream generation function using a
2067+-- /Compare 'foldMapWith'/
2070+{-# INLINE concatMapWith #-}
2073+ => (forall c. t m c -> t m c -> t m c)
2077+concatMapWith = K.concatMapBy
2059-- | Map a stream producing function on each element of the stream and then
2079-- | Map a stream producing function on each element of the stream and then
2060-- flatten the results into a single stream.
2080-- flatten the results into a single stream.
2063−-- concatMap = 'concatMapBy' 'Serial.serial'
2083+-- concatMap = 'concatMapWith' 'Serial.serial'
2064-- concatMap f = 'concatMapM' (return . f)
2084-- concatMap f = 'concatMapM' (return . f)