Use scanl' from the imported stream (D or K)
It was earlier hardcoded to use D.
commit58e8d397f5a870a58fe9770634a2062aa9cf276a
authorHarendra Kumar <harendra.kumar@gmail.com>
dateTue 6 Nov 2018, 05:12 (8 years ago)
parent734004b
src/Streamly/Prelude.hs+1−1
@@ -847,7 +847,7 @@ scanlM' step begin m = fromStreamD $ D.scanlM' step begin $ toStreamD m
847847-- @since 0.2.0
848848{-# INLINE scanl' #-}
849849scanl' :: (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
851851
852852------------------------------------------------------------------------------
853853-- Transformation by Filtering