on master help sign in
Rearrange transformation section
8053f66Harendra Kumar
src/Streamly/Prelude.hs+44−48
@@ -549,11 +549,6 @@ module Streamly.Prelude
549 -- trimming sequences
549 -- trimming sequences
550 , stripPrefix
550 , stripPrefix
551
551
552− -- * Parallel Function Application
553− -- $application
554− , (|$)
555− , (|&)
556−
557 -- * Transformation
552 -- * Transformation
558
553
559 -- ** Mapping
554 -- ** Mapping
@@ -572,7 +567,7 @@ module Streamly.Prelude
572 , sequence
567 , sequence
573 , mapM
568 , mapM
574
569
575− -- ** Special Maps
570+ -- ** Mapping Side Effects
576 , mapM_
571 , mapM_
577 , trace
572 , trace
578 , tap
573 , tap
@@ -638,7 +633,7 @@ module Streamly.Prelude
638 , scanl1'
633 , scanl1'
639 , scanl1M'
634 , scanl1M'
640
635
641− -- ** Scan Using Fold
636+ -- ** Scanning By 'Fold'
642 , scan
637 , scan
643 , postscan
638 , postscan
644
639
@@ -647,20 +642,20 @@ module Streamly.Prelude
647 -- imperative terms a filter over a stream corresponds to a loop with a
642 -- imperative terms a filter over a stream corresponds to a loop with a
648 -- @continue@ clause for the cases when the predicate fails.
643 -- @continue@ clause for the cases when the predicate fails.
649
644
645+ , deleteBy
650 , filter
646 , filter
651 , filterM
647 , 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
662 , uniq
648 , uniq
663
649
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+
664 -- ** Inserting Elements
659 -- ** Inserting Elements
665 -- | Inserting elements is a special case of interleaving/merging streams.
660 -- | Inserting elements is a special case of interleaving/merging streams.
666
661
@@ -668,29 +663,15 @@ module Streamly.Prelude
668 , intersperseM
663 , intersperseM
669 , intersperse
664 , intersperse
670
665
666+ -- ** Reordering Elements
667+ , reverse
668+
671 -- ** Indexing
669 -- ** Indexing
672 -- | Indexing can be considered as a special type of zipping where we zip a
670 -- | Indexing can be considered as a special type of zipping where we zip a
673 -- stream with an index stream.
671 -- stream with an index stream.
674 , indexed
672 , indexed
675 , indexedR
673 , indexedR
676
674
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−
694 -- ** Searching
675 -- ** Searching
695 -- | Finding the presence or location of an element, a sequence of elements
676 -- | Finding the presence or location of an element, a sequence of elements
696 -- or another stream within a stream.
677 -- or another stream within a stream.
@@ -699,7 +680,30 @@ module Streamly.Prelude
699 , findIndices
680 , findIndices
700 , elemIndices
681 , elemIndices
701
682
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+
702− -- ** Splitting
706+ -- * Splitting
703 -- | In general we can express splitting in terms of parser combinators.
707 -- | In general we can express splitting in terms of parser combinators.
704 -- These are some common use functions for convenience and efficiency.
708 -- These are some common use functions for convenience and efficiency.
705 -- While parsers can fail these functions are designed to transform a
709 -- While parsers can fail these functions are designed to transform a
@@ -721,6 +725,11 @@ module Streamly.Prelude
721 -- segment is missing it is considered as empty, therefore, we never
725 -- segment is missing it is considered as empty, therefore, we never
722 -- encounter an error in parsing.
726 -- encounter an error in parsing.
723
727
728+ -- -- ** Breaking
729+
730+ , chunksOf
731+ , intervalsOf
732+
724 -- -- ** Splitting By Elements
733 -- -- ** Splitting By Elements
725 , splitOn
734 , splitOn
726 , splitOnSuffix
735 , splitOnSuffix
@@ -860,19 +869,6 @@ module Streamly.Prelude
860 , finally
869 , finally
861 , handle
870 , handle
862
871
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−
876 -- * Stream Types
872 -- * Stream Types
877 -- | Stream types that end with a @T@ (e.g. 'SerialT') are monad
873 -- | Stream types that end with a @T@ (e.g. 'SerialT') are monad
878 -- transformers.
874 -- transformers.