| 1 | effect/GroupBy#GroupBy: |
| 2 | replacement: "Stream<readonly [K, Stream<V>]>" |
| 3 | note: "The GroupBy datatype is removed in v4; Stream.groupBy/groupByKey now return an ordinary Stream of readonly [key, substream] pairs, processed with regular Stream operators." |
| 4 | effect/GroupBy#GroupBy.Variance: |
| 5 | replacement: "none" |
| 6 | note: "Variance plumbing for the removed GroupBy datatype; v4 has no GroupBy type, so there is no variance interface to migrate to." |
| 7 | effect/GroupBy#GroupByTypeId: |
| 8 | replacement: "none" |
| 9 | note: "Brand symbol for the removed GroupBy datatype; v4 groupBy results are plain Streams, discriminated with Stream.isStream if needed." |
| 10 | effect/GroupBy#evaluate: |
| 11 | replacement: "Stream.flatMap" |
| 12 | note: "Apply the per-group function over the [key, stream] pairs with Stream.flatMap (or Stream.mapEffect for an effectful result per group), using { concurrency: \"unbounded\" } to reproduce v3's parallel-groups/arbitrary-merge-order behavior; the v3 bufferSize option moved onto Stream.groupBy itself." |
| 13 | example: | |
| 14 | // v3: stream.pipe(Stream.groupByKey(f), GroupBy.evaluate((key, s) => g(key, s))) |
| 15 | stream.pipe( |
| 16 | Stream.groupByKey(f), |
| 17 | Stream.flatMap(([key, s]) => g(key, s), { concurrency: "unbounded" }) |
| 18 | ) |
| 19 | effect/GroupBy#filter: |
| 20 | replacement: "Stream.filter" |
| 21 | note: "Filter the groups by key with an ordinary Stream.filter on the pairs: Stream.filter(([key]) => predicate(key))." |
| 22 | effect/GroupBy#first: |
| 23 | replacement: "Stream.take" |
| 24 | note: "Keep only the first n groups with an ordinary Stream.take(n) on the [key, stream] pair stream." |
| 25 | effect/GroupBy#make: |
| 26 | replacement: "none" |
| 27 | note: "No wrapper to construct in v4: a grouped stream is just any Stream<readonly [K, Stream<V>]>, so build the pair stream directly (Stream.groupBy/groupByKey produce it); the v3 shape Stream<[K, Dequeue<Take<V, E>>]> is gone along with the queue-of-Take encoding." |