@@ -902,9 +902,7 @@ runStep (Fold step initial extract) a = return $ Fold step initial1 extract
902-- applied to a fold input stream. groupBy et al can be written as terminating
902-- applied to a fold input stream. groupBy et al can be written as terminating
903-- folds and then we can apply "many" to use those repeatedly on a stream.
903-- folds and then we can apply "many" to use those repeatedly on a stream.
905−-- XXXX flip the order of arguments
907−-- | Collect zero or more applications of a fold. @many collect split@ applies
905+-- | Collect zero or more applications of a fold. @many split collect@ applies
908-- the @split@ fold repeatedly on the input stream and accumulates zero or more
906-- the @split@ fold repeatedly on the input stream and accumulates zero or more
909-- fold results using @collect@.
907-- fold results using @collect@.
@@ -915,8 +913,8 @@ runStep (Fold step initial extract) a = return $ Fold step initial1 extract
915-- /See also: Streamly.Prelude.concatMap, Streamly.Prelude.foldMany/
913-- /See also: Streamly.Prelude.concatMap, Streamly.Prelude.foldMany/
917{-# INLINE many #-}
915{-# INLINE many #-}
918−many :: Monad m => Fold m b c -> Fold m a b -> Fold m a c
916+many :: Monad m => Fold m a b -> Fold m b c -> Fold m a c
919−many (Fold cstep cinitial cextract) (Fold sstep sinitial sextract) =
917+many (Fold sstep sinitial sextract) (Fold cstep cinitial cextract) =
920 Fold step initial extract
918 Fold step initial extract
@@ -966,7 +964,7 @@ many (Fold cstep cinitial cextract) (Fold sstep sinitial sextract) =
966-- of @n@ items in the input stream and supplies the result to the @collect@
964-- of @n@ items in the input stream and supplies the result to the @collect@
969−-- > chunksOf n split collect = many collect (take n split)
967+-- > chunksOf n split = many (take n split)
971-- Stops when @collect@ stops.
969-- Stops when @collect@ stops.
@@ -974,7 +972,7 @@ many (Fold cstep cinitial cextract) (Fold sstep sinitial sextract) =
975{-# INLINE chunksOf #-}
973{-# INLINE chunksOf #-}
976chunksOf :: Monad m => Int -> Fold m a b -> Fold m b c -> Fold m a c
974chunksOf :: Monad m => Int -> Fold m a b -> Fold m b c -> Fold m a c
977−chunksOf n split collect = many collect (take n split)
975+chunksOf n split = many (take n split)
@@ -1079,10 +1077,10 @@ takeInterval n (Fold step initial done) = Fold step' initial' done'
1082−-- > intervalsOf n split collect = many collect (takeInterval n split)
1080+-- > intervalsOf n split = many (takeInterval n split)
1084-- /Pre-release/
1082-- /Pre-release/
1086{-# INLINE intervalsOf #-}
1084{-# INLINE intervalsOf #-}
1087intervalsOf :: MonadAsync m => Double -> Fold m a b -> Fold m b c -> Fold m a c
1085intervalsOf :: MonadAsync m => Double -> Fold m a b -> Fold m b c -> Fold m a c
1088−intervalsOf n split collect = many collect (takeInterval n split)
1086+intervalsOf n split = many (takeInterval n split)