@@ -216,7 +216,16 @@ module Streamly.Data.Stream
216 -- | Usually you can use the folds in "Streamly.Data.Fold". However, some
216 -- | Usually you can use the folds in "Streamly.Data.Fold". However, some
217 -- folds that may be commonly used or may have an edge in performance in
217 -- folds that may be commonly used or may have an edge in performance in
218 -- some cases are provided here.
218 -- some cases are provided here.
222+ -- >>> foldlM' f a = Stream.fold (Fold.foldlM' f a)
223+ -- >>> foldl1 f = Stream.fold (Fold.foldl1' f)
224+ -- >>> foldl' f a = Stream.fold (Fold.foldl' f a)
225+ -- >>> drain = Stream.fold Fold.drain
226+ -- >>> mapM_ f = Stream.fold (Fold.drainMapM f)
227+ -- >>> length = Stream.fold Fold.length
228+ -- >>> head = Stream.fold Fold.one
222 -- * Mapping
231 -- * Mapping
@@ -428,7 +437,6 @@ module Streamly.Data.Stream
428 -- >>> splitOnSuffix p f = Stream.foldMany (Fold.takeEndBy_ p f)
437 -- >>> splitOnSuffix p f = Stream.foldMany (Fold.takeEndBy_ p f)
429 -- >>> groupsBy eq f = Stream.parseMany (Parser.groupBy eq f)
438 -- >>> groupsBy eq f = Stream.parseMany (Parser.groupBy eq f)
430 -- >>> groupsByRolling eq f = Stream.parseMany (Parser.groupByRolling eq f)
439 -- >>> groupsByRolling eq f = Stream.parseMany (Parser.groupByRolling eq f)
431− -- >>> wordsBy p f = Stream.parseMany (Parser.wordBy p f)
432 -- >>> groupsOf n f = Stream.foldMany (Fold.take n f)
440 -- >>> groupsOf n f = Stream.foldMany (Fold.take n f)
433 , foldMany -- XXX Rename to foldRepeat
441 , foldMany -- XXX Rename to foldRepeat
434 , groupsOf
442 , groupsOf