We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fc8544 commit 1addabbCopy full SHA for 1addabb
core/src/Streamly/Internal/Data/Scanl/Window.hs
@@ -151,6 +151,7 @@ incrScanWith n (Scanl step1 initial1 extract1 final1) =
151
Done b -> Done b
152
153
step (SWArray arr i st) a = do
154
+ -- XXX compare this with the slidingWindow impl
155
arr1 <- liftIO $ MutArray.unsafeSnoc arr a
156
r <- step1 st (Insert a, RingArray.unsafeCastMutArray arr1)
157
return $ case r of
@@ -166,7 +167,7 @@ incrScanWith n (Scanl step1 initial1 extract1 final1) =
166
167
r <- step1 st (Replace a old, rb1)
168
return $
169
case r of
- Partial s -> Partial $ SWRing rb s
170
+ Partial s -> Partial $ SWRing rb1 s
171
172
173
extract (SWArray _ _ st) = extract1 st
0 commit comments