on master help sign in
Use scanl' from the imported stream (D or K)
58e8d39Harendra Kumar
src/Streamly/Prelude.hs+1−1
@@ -847,7 +847,7 @@ scanlM' step begin m = fromStreamD $ D.scanlM' step begin $ toStreamD m
847-- @since 0.2.0
847-- @since 0.2.0
848{-# INLINE scanl' #-}
848{-# INLINE scanl' #-}
849scanl' :: (IsStream t, Monad m) => (b -> a -> b) -> b -> t m a -> t m b
849scanl' :: (IsStream t, Monad m) => (b -> a -> b) -> b -> t m a -> t m b
850−scanl' step = scanlM' (\a b -> return (step a b))
850+scanl' step z m = fromStreamS $ S.scanl' step z $ toStreamS m
851
851
852------------------------------------------------------------------------------
852------------------------------------------------------------------------------
853-- Transformation by Filtering
853-- Transformation by Filtering