on master help sign in
Rearrange transformation section
commit8053f66273b223c4ef3d0c5a0844a6df897bc31e authorHarendra Kumar <harendra@composewell.com> dateFri 2 Apr 2021, 17:14 (6 years ago) parent796bb22
1 file changed+44−48
src/Streamly/Prelude.hs+44−48
src/Streamly/Prelude.hs+44−48
@@ -549,11 +549,6 @@ module Streamly.Prelude
549549 -- trimming sequences
550550 , stripPrefix
551551
552− -- * Parallel Function Application
553− -- $application
554− , (|$)
555− , (|&)
556−
557552 -- * Transformation
558553
559554 -- ** Mapping
@@ -572,7 +567,7 @@ module Streamly.Prelude
572567 , sequence
573568 , mapM
574569
575− -- ** Special Maps
570+ -- ** Mapping Side Effects
576571 , mapM_
577572 , trace
578573 , tap
@@ -638,7 +633,7 @@ module Streamly.Prelude
638633 , scanl1'
639634 , scanl1M'
640635
641− -- ** Scan Using Fold
636+ -- ** Scanning By 'Fold'
642637 , scan
643638 , postscan
644639
@@ -647,20 +642,20 @@ module Streamly.Prelude
647642 -- imperative terms a filter over a stream corresponds to a loop with a
648643 -- @continue@ clause for the cases when the predicate fails.
649644
645+ , deleteBy
650646 , filter
651647 , filterM
652−
653− -- ** Mapping Filters
654− -- | Mapping along with filtering
655−
656− , mapMaybe
657− , mapMaybeM
658−
659− -- ** Deleting Elements
660− -- | Deleting elements is a special case of de-interleaving streams.
661− , deleteBy
662648 , uniq
663649
650+ -- ** Trimming
651+ -- | Take or remove elements from one or both ends of a stream.
652+ , take
653+ , takeWhile
654+ , takeWhileM
655+ , drop
656+ , dropWhile
657+ , dropWhileM
658+
664659 -- ** Inserting Elements
665660 -- | Inserting elements is a special case of interleaving/merging streams.
666661
@@ -668,29 +663,15 @@ module Streamly.Prelude
668663 , intersperseM
669664 , intersperse
670665
666+ -- ** Reordering Elements
667+ , reverse
668+
671669 -- ** Indexing
672670 -- | Indexing can be considered as a special type of zipping where we zip a
673671 -- stream with an index stream.
674672 , indexed
675673 , indexedR
676674
677− -- ** Reordering Elements
678− , reverse
679−
680− -- ** Trimming
681− -- | Take or remove elements from one or both ends of a stream.
682− , take
683− , takeWhile
684− , takeWhileM
685− , drop
686− , dropWhile
687− , dropWhileM
688−
689− -- -- ** Breaking
690−
691− , chunksOf
692− , intervalsOf
693−
694675 -- ** Searching
695676 -- | Finding the presence or location of an element, a sequence of elements
696677 -- or another stream within a stream.
@@ -699,7 +680,30 @@ module Streamly.Prelude
699680 , findIndices
700681 , elemIndices
701682
702− -- ** Splitting
683+ -- ** Maybe Streams
684+ , mapMaybe
685+ , mapMaybeM
686+
687+ -- * Concurrent Transformation
688+ -- ** Concurrent Pipelines
689+ -- $application
690+ , (|$)
691+ , (|&)
692+
693+ -- ** Concurrency Control
694+ -- $concurrency
695+ , maxThreads
696+ , maxBuffer
697+
698+ -- ** Rate Limiting
699+ , Rate (..)
700+ , rate
701+ , avgRate
702+ , minRate
703+ , maxRate
704+ , constRate
705+
706+ -- * Splitting
703707 -- | In general we can express splitting in terms of parser combinators.
704708 -- These are some common use functions for convenience and efficiency.
705709 -- While parsers can fail these functions are designed to transform a
@@ -721,6 +725,11 @@ module Streamly.Prelude
721725 -- segment is missing it is considered as empty, therefore, we never
722726 -- encounter an error in parsing.
723727
728+ -- -- ** Breaking
729+
730+ , chunksOf
731+ , intervalsOf
732+
724733 -- -- ** Splitting By Elements
725734 , splitOn
726735 , splitOnSuffix
@@ -860,19 +869,6 @@ module Streamly.Prelude
860869 , finally
861870 , handle
862871
863− -- * Concurrency Control
864− -- $concurrency
865− , maxThreads
866− , maxBuffer
867−
868− -- * Rate Limiting
869− , Rate (..)
870− , rate
871− , avgRate
872− , minRate
873− , maxRate
874− , constRate
875−
876872 -- * Stream Types
877873 -- | Stream types that end with a @T@ (e.g. 'SerialT') are monad
878874 -- transformers.