@@ -174,8 +174,6 @@ module Streamly.Prelude
174 -- ** Right Folds
174 -- ** Right Folds
175 -- $rightfolds
175 -- $rightfolds
181 -- ** Left Folds
179 -- ** Left Folds
@@ -199,7 +197,6 @@ module Streamly.Prelude
201 , product
199 , product
204 -- -- ** To Summary (Maybe) (Full Folds)
201 -- -- ** To Summary (Maybe) (Full Folds)
205 -- -- | Folds that summarize a non-empty stream to a 'Just' value and return
202 -- -- | Folds that summarize a non-empty stream to a 'Just' value and return
@@ -209,7 +206,6 @@ module Streamly.Prelude
209 , minimumBy
206 , minimumBy
210 , minimum
207 , minimum
212− -- , toListRev -- experimental
214 -- ** Lazy Folds
210 -- ** Lazy Folds
@@ -252,19 +248,13 @@ module Streamly.Prelude
254 , isPrefixOf
250 , isPrefixOf
257 , isSubsequenceOf
251 , isSubsequenceOf
259 -- trimming sequences
253 -- trimming sequences
260 , stripPrefix
254 , stripPrefix
264 -- * Transformation
256 -- * Transformation
268 -- ** Mapping
258 -- ** Mapping
269 -- | In imperative terms a map operation can be considered as a loop over
259 -- | In imperative terms a map operation can be considered as a loop over
270 -- the stream that transforms the stream into another stream by performing
260 -- the stream that transforms the stream into another stream by performing
@@ -343,8 +333,6 @@ module Streamly.Prelude
343 , scanlM'
333 , scanlM'
344 , postscanl'
334 , postscanl'
345 , postscanlM'
335 , postscanlM'
348 , scanl1'
336 , scanl1'
349 , scanl1M'
337 , scanl1M'
@@ -352,16 +340,6 @@ module Streamly.Prelude
353 , postscan
341 , postscan
365 -- ** Filtering
343 -- ** Filtering
366 -- | Remove some elements from the stream based on a predicate. In
344 -- | Remove some elements from the stream based on a predicate. In
367 -- imperative terms a filter over a stream corresponds to a loop with a
345 -- imperative terms a filter over a stream corresponds to a loop with a
@@ -380,9 +358,6 @@ module Streamly.Prelude
380 -- | Deleting elements is a special case of de-interleaving streams.
358 -- | Deleting elements is a special case of de-interleaving streams.
381 , deleteBy
359 , deleteBy
383− -- , uniqBy -- by predicate e.g. to remove duplicate "/" in a path
384− -- , uniqOn -- to remove duplicate sequences
385− -- , pruneBy -- dropAround + uniqBy - like words
387 -- ** Inserting Elements
362 -- ** Inserting Elements
388 -- | Inserting elements is a special case of interleaving/merging streams.
363 -- | Inserting elements is a special case of interleaving/merging streams.
@@ -390,73 +365,27 @@ module Streamly.Prelude
390 , insertBy
365 , insertBy
391 , intersperseM
366 , intersperseM
392 , intersperse
367 , intersperse
393− -- , insertAfterEach
394− -- , intersperseBySpan
395− -- , intersperseByIndices -- using an index function/stream
396− -- , intersperseByTime
397− -- , intersperseByEvent
399− -- -- * Inserting Streams in Streams
403 -- ** Indexing
369 -- ** Indexing
404 -- | Indexing can be considered as a special type of zipping where we zip a
370 -- | Indexing can be considered as a special type of zipping where we zip a
405 -- stream with an index stream.
371 -- stream with an index stream.
406 , indexed
372 , indexed
407 , indexedR
373 , indexedR
409− -- , timestampedR -- timer
411 -- ** Reordering Elements
375 -- ** Reordering Elements
412 , reverse
376 , reverse
415 -- ** Trimming
378 -- ** Trimming
416 -- | Take or remove elements from one or both ends of a stream.
379 -- | Take or remove elements from one or both ends of a stream.
419 , takeWhile
381 , takeWhile
420 , takeWhileM
382 , takeWhileM
424 , dropWhile
384 , dropWhile
425 , dropWhileM
385 , dropWhileM
429 -- -- ** Breaking
387 -- -- ** Breaking
432− -- , splitAt -- spanN
433− -- , splitIn -- sessionN
436− -- , span -- spanWhile
437− -- , break -- breakBefore
445− -- breakOnSeq/breakOnArray -- on a fixed sequence
446− -- breakOnStream -- on a stream
449− -- | Streams can be sliced into segments in space or in time. We use the
450− -- term @chunk@ to refer to a spatial length of the stream (spatial window)
451− -- and the term @session@ to refer to a length in time (time window).
453− -- In imperative terms, grouped folding can be considered as a nested loop
454− -- where we loop over the stream to group elements and then loop over
455− -- individual groups to fold them to a single value that is yielded in the
460 , chunksOf
389 , chunksOf
461 , intervalsOf
390 , intervalsOf
@@ -468,15 +397,6 @@ module Streamly.Prelude
468 , findIndices
397 , findIndices
469 , elemIndices
398 , elemIndices
471− -- -- *** Searching Sequences
472− -- , seqIndices -- search a sequence in the stream
474− -- -- *** Searching Multiple Sequences
475− -- , seqIndices -- search a sequence in the stream
477− -- -- ** Searching Streams
478− -- -- | Finding a stream within another stream.
480 -- ** Splitting
400 -- ** Splitting
481 -- | In general we can express splitting in terms of parser combinators.
401 -- | In general we can express splitting in terms of parser combinators.
482 -- These are some common use functions for convenience and efficiency.
402 -- These are some common use functions for convenience and efficiency.
@@ -502,32 +422,10 @@ module Streamly.Prelude
502 -- -- ** Splitting By Elements
422 -- -- ** Splitting By Elements
503 , splitOn
423 , splitOn
504 , splitOnSuffix
424 , splitOnSuffix
508 , splitWithSuffix
426 , splitWithSuffix
510 , wordsBy -- strip, compact and split
427 , wordsBy -- strip, compact and split
512− -- -- *** Splitting By Sequences
514− -- , splitOnSuffixSeq
515− -- , splitOnPrefixSeq
517− -- Keeping the delimiters
519− -- , splitBySeqSuffix
520− -- , splitBySeqPrefix
523− -- Splitting By Multiple Sequences
525− -- , splitOnAnySuffixSeq
526− -- , splitOnAnyPrefixSeq
528− -- -- ** Splitting By Streams
529− -- -- | Splitting a stream using another stream as separator.
531 -- ** Grouping
429 -- ** Grouping
532 -- | Splitting a stream by combining multiple contiguous elements into
430 -- | Splitting a stream by combining multiple contiguous elements into
533 -- groups using some criterion.
431 -- groups using some criterion.
@@ -535,40 +433,6 @@ module Streamly.Prelude
535 , groupsBy
433 , groupsBy
536 , groupsByRolling
434 , groupsByRolling
539− -- * Windowed Classification
540− -- | Split the stream into windows or chunks in space or time. Each window
541− -- can be associated with a key, all events associated with a particular
542− -- key in the window can be folded to a single result. The stream is split
543− -- into windows of specified size, the window can be terminated early if
544− -- the closing flag is specified in the input stream.
546− -- The term "chunk" is used for a space window and the term "session" is
547− -- used for a time window.
549− -- ** Tumbling Windows
550− -- | A new window starts after the previous window is finished.
551− -- , classifyChunksOf
552− -- , classifySessionsOf
554− -- ** Keep Alive Windows
555− -- | The window size is extended if an event arrives within the specified
556− -- window size. This can represent sessions with idle or inactive timeout.
557− -- , classifyKeepAliveChunks
558− -- , classifyKeepAliveSessions
561− -- ** Sliding Windows
562− -- | A new window starts after the specified slide from the previous
563− -- window. Therefore windows can overlap.
564− , classifySlidingChunks
565− , classifySlidingSessions
567− -- ** Sliding Window Buffers
568− -- , slidingChunkBuffer
569− -- , slidingSessionBuffer
572 -- * Combining Streams
436 -- * Combining Streams
573 -- | New streams can be constructed by appending, merging or zipping
437 -- | New streams can be constructed by appending, merging or zipping
574 -- existing streams.
438 -- existing streams.
@@ -660,9 +524,7 @@ module Streamly.Prelude
660 -- > filter p m = S.concatMap (\x -> if p x then S.yield x else S.nil) m
524 -- > filter p m = S.concatMap (\x -> if p x then S.yield x else S.nil) m
663− -- XXX add stateful concatMapWith
664 , concatMapWith
527 , concatMapWith
666 , concatMap
528 , concatMap
667 , concatMapM
529 , concatMapM
668 , concatUnfold
530 , concatUnfold