Fix lchunksOf.
commitf6c91cb0c1429263b0dd17f6d7412975f36d7fa5
authorPranay Sashank <pranaysashank@gmail.com>
dateTue 13 Aug 2019, 11:41 (7 years ago)
parent47ede46
src/Streamly/Fold/Types.hs+4−1
@@ -362,7 +362,10 @@ lchunksOf n (Fold step1 initial1 extract1) (Fold step2 initial2 extract2) =
362362 i1 <- initial1
363363 acc1 <- step1 i1 a
364364 return $ Tuple3' 1 acc1 acc2
365− extract' (Tuple3' _ _ r) = extract2 r
365+ extract' (Tuple3' _ r1 r2) = do
366+ res <- extract1 r1
367+ acc2 <- step2 r2 res
368+ extract2 acc2
366369
367370-- | Group the input stream into windows of n second each and then fold each
368371-- group using the provided fold function.