on master help sign in
Add simplified impl of groupsBy and groupsRollingBy as comments
30ea7f1Adithya Kumar
src/Streamly/Internal/Data/Stream/StreamD/Nesting.hs+6
@@ -1196,6 +1196,9 @@ groupsBy :: Monad m
1196 -> Fold m a b
1196 -> Fold m a b
1197 -> Stream m a
1197 -> Stream m a
1198 -> Stream m b
1198 -> Stream m b
1199+{-
1200+groupsBy eq fld = parseMany (PRD.groupBy eq fld)
1201+-}
1199groupsBy cmp (Fold fstep initial done) (Stream step state) =
1202groupsBy cmp (Fold fstep initial done) (Stream step state) =
1200 Stream stepOuter (GroupingInit state)
1203 Stream stepOuter (GroupingInit state)
1201
1204
@@ -1277,6 +1280,9 @@ groupsRollingBy :: Monad m
1277 -> Fold m a b
1280 -> Fold m a b
1278 -> Stream m a
1281 -> Stream m a
1279 -> Stream m b
1282 -> Stream m b
1283+{-
1284+groupsRollingBy eq fld = parseMany (PRD.groupByRolling eq fld)
1285+-}
1280groupsRollingBy cmp (Fold fstep initial done) (Stream step state) =
1286groupsRollingBy cmp (Fold fstep initial done) (Stream step state) =
1281 Stream stepOuter (GroupingInit state)
1287 Stream stepOuter (GroupingInit state)
1282
1288