on master help sign in
Fix a bug in foldMany1

Jump to correct state on Skip.

commit01e5e5179edd6a4e762b0b824d5886176f8e36be authorHarendra Kumar <harendra@composewell.com> dateFri 5 Feb 2021, 18:46 (6 years ago) parentccbaa15
1 file changed+1−1
src/Streamly/Internal/Data/Stream/StreamD/Type.hs+1−1
src/Streamly/Internal/Data/Stream/StreamD/Type.hs+1−1
@@ -890,7 +890,7 @@ foldMany1 (Fold fstep initial extract) (Stream step state) =
890890 r <- step (adaptState gst) st
891891 case r of
892892 Yield x s -> consume x s fs
893− Skip s -> return $ Skip (FoldMany1Start s)
893+ Skip s -> return $ Skip (FoldMany1First fs s)
894894 Stop -> return Stop
895895 step' gst (FoldMany1Loop st fs) = do
896896 r <- step (adaptState gst) st