File tree Expand file tree Collapse file tree
core/src/Streamly/Internal/Data Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -918,7 +918,7 @@ slidingWindowWith n (Fold step1 initial1 extract1 final1) =
918918 return $
919919 case r of
920920 Partial s -> Partial
921- $ SWArray (MutArray. arrContents arr) 0 s n
921+ $ SWArray (MutArray. arrContents arr) 0 s (n - 1 )
922922 Done b -> Done b
923923
924924 step (SWArray mba rh st i) a = do
@@ -929,12 +929,13 @@ slidingWindowWith n (Fold step1 initial1 extract1 final1) =
929929 case r of
930930 Partial s ->
931931 if i > 0
932- then Partial $ SWArray mba rh1 s (i- 1 )
932+ then Partial $ SWArray mba rh1 s (i - 1 )
933933 else Partial $ SWRing mba rh1 s
934934 Done b -> Done b
935935
936936 step (SWRing mba rh st) a = do
937- (rb1@ (RingArray _ _ rh1), old) <- replace (RingArray mba (n * SIZE_OF (a)) rh) a
937+ (rb1@ (RingArray _ _ rh1), old) <-
938+ replace (RingArray mba (n * SIZE_OF (a)) rh) a
938939 r <- step1 st ((a, Just old), toMutArray rb1)
939940 return $
940941 case r of
You can’t perform that action at this time.
0 commit comments