@@ -2267,10 +2267,12 @@ lchunksOf n (Fold step1 initial1 extract1) (Fold step2 initial2 extract2) =
22672267 res <- step1 r1 a
22682268 return $ Tuple3' (i + 1) res r2
22692269 else do
2270+ res <- extract1 r1
2271+ acc2 <- step2 r2 res
2272+
22702273 i1 <- initial1
2271− res1 <- extract1 r1
2272− res <- step2 r2 res1
2273− return $ Tuple3' 0 i1 res
2274+ acc1 <- step1 i1 a
2275+ return $ Tuple3' 1 acc1 acc2
22742276 extract' (Tuple3' _ _ r) = extract2 r
22752277
22762278-- | Group the input stream into windows of n second each and then fold each