on master help sign in
Make some doc updates to the Data.Stream module
commit7475d44627d4a443fd5898acf4eb73a14124e08d authorHarendra Kumar <harendra@composewell.com> dateSat 12 Nov 2022, 16:27 (4 years ago) parentb083de2
3 files changed+3−8
core/src/Streamly/Data/Stream.hs+2−3 core/src/Streamly/Internal/Data/Stream/StreamK/Type.hs+1−3 core/src/Streamly/Internal/Data/Stream/Type.hs−2
core/src/Streamly/Data/Stream.hs+2−3
@@ -310,6 +310,7 @@ module Streamly.Data.Stream
310310 -- ** Stateless Filters
311311 -- | 'mapMaybeM' is the most general stateless filtering operation. All
312312 -- other filtering operations can be expressed using it.
313+
313314 -- EXPLANATION:
314315 -- In imperative terms a filter over a stream corresponds to a loop with a
315316 -- @continue@ clause for the cases when the predicate fails.
@@ -318,6 +319,7 @@ module Streamly.Data.Stream
318319 , mapMaybeM
319320 , filter
320321 , filterM
322+ , catMaybes
321323
322324 -- ** Stateful Filters
323325 -- | 'scanMaybe' is the most general stateful filtering operation. The
@@ -387,9 +389,6 @@ module Streamly.Data.Stream
387389 -- element of the input stream generates another stream and then loops over
388390 -- that inner stream as well producing effects and generating a single
389391 -- output stream.
390− -- The 'Monad' instances of different stream types provide a more
391− -- convenient way of writing nested loops. Note that the monad bind
392− -- operation is just @flip concatMap@.
393392 --
394393 -- One dimension loops are just a special case of nested loops. For
395394 -- example, 'concatMap' can degenerate to a simple map operation:
core/src/Streamly/Internal/Data/Stream/StreamK/Type.hs+1−3
@@ -1023,9 +1023,7 @@ bindWith par m1 f = go m1
10231023
10241024-- | Perform a 'concatMap' using a specified concat strategy. The first
10251025-- argument specifies a merge or concat function that is used to merge the
1026−-- streams generated by the map function. For example, the concat function
1027−-- could be 'serial', 'parallel', 'async', 'ahead' or any other zip or merge
1028−-- function.
1026+-- streams generated by the map function.
10291027--
10301028-- @since 0.7.0
10311029{-# INLINE concatMapWith #-}
core/src/Streamly/Internal/Data/Stream/Type.hs−2
@@ -530,8 +530,6 @@ bindWith par m1 f =
530530-- elements in the input @stream@ and the @mixer@ function is used to merge
531531-- those streams.
532532--
533−-- Note we can merge streams concurrently by using a concurrent merge function.
534−--
535533{-# INLINE concatMapWith #-}
536534concatMapWith
537535 :: (Stream m b -> Stream m b -> Stream m b)