Add simplified impl of groupsBy and groupsRollingBy as comments
commit30ea7f10911c5d79f1e3726ee5e2b3f052dbfe2a
authorAdithya Kumar <adithya@composewell.com>
dateSun 14 Feb 2021, 00:21 (6 years ago)
parent969f8c0
src/Streamly/Internal/Data/Stream/StreamD/Nesting.hs+6
@@ -1196,6 +1196,9 @@ groupsBy :: Monad m
11961196 -> Fold m a b
11971197 -> Stream m a
11981198 -> Stream m b
1199+{-
1200+groupsBy eq fld = parseMany (PRD.groupBy eq fld)
1201+-}
11991202groupsBy cmp (Fold fstep initial done) (Stream step state) =
12001203 Stream stepOuter (GroupingInit state)
12011204
@@ -1277,6 +1280,9 @@ groupsRollingBy :: Monad m
12771280 -> Fold m a b
12781281 -> Stream m a
12791282 -> Stream m b
1283+{-
1284+groupsRollingBy eq fld = parseMany (PRD.groupByRolling eq fld)
1285+-}
12801286groupsRollingBy cmp (Fold fstep initial done) (Stream step state) =
12811287 Stream stepOuter (GroupingInit state)
12821288