on master help sign in
Add scan skeleton for folds
0f3e545Harendra Kumar
src/Streamly/Internal/Data/Fold.hs+11
@@ -112,6 +112,7 @@ module Streamly.Internal.Data.Fold
112 , lmap
112 , lmap
113 --, lsequence
113 --, lsequence
114 , lmapM
114 , lmapM
115+ , scan
115 , indexed
116 , indexed
116
117
117 -- ** Filtering
118 -- ** Filtering
@@ -375,6 +376,16 @@ transform (Pipe pstep1 pstep2 pinitial) (Fold fstep finitial fextract) =
375
376
376 extract (Tuple' _ fs) = fextract fs
377 extract (Tuple' _ fs) = fextract fs
377
378
379+-- See StreamD/Transform.scanOnce for implementing this.
380+--
381+-- | Scan the input of a 'Fold' to change it in a stateful manner using another
382+-- 'Fold'.
383+--
384+-- /Unimplemented/
385+{-# INLINE scan #-}
386+scan :: Fold m a b -> Fold m b c -> Fold m a c
387+scan = undefined
388+
378------------------------------------------------------------------------------
389------------------------------------------------------------------------------
379-- Left folds
390-- Left folds
380------------------------------------------------------------------------------
391------------------------------------------------------------------------------