mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-13 05:47:44 +02:00
27 lines
1.8 KiB
YAML
27 lines
1.8 KiB
YAML
effect/GroupBy#GroupBy:
|
|
replacement: "Stream<readonly [K, Stream<V>]>"
|
|
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."
|
|
effect/GroupBy#GroupBy.Variance:
|
|
replacement: "none"
|
|
note: "Variance plumbing for the removed GroupBy datatype; v4 has no GroupBy type, so there is no variance interface to migrate to."
|
|
effect/GroupBy#GroupByTypeId:
|
|
replacement: "none"
|
|
note: "Brand symbol for the removed GroupBy datatype; v4 groupBy results are plain Streams, discriminated with Stream.isStream if needed."
|
|
effect/GroupBy#evaluate:
|
|
replacement: "Stream.flatMap"
|
|
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."
|
|
example: |
|
|
// v3: stream.pipe(Stream.groupByKey(f), GroupBy.evaluate((key, s) => g(key, s)))
|
|
stream.pipe(
|
|
Stream.groupByKey(f),
|
|
Stream.flatMap(([key, s]) => g(key, s), { concurrency: "unbounded" })
|
|
)
|
|
effect/GroupBy#filter:
|
|
replacement: "Stream.filter"
|
|
note: "Filter the groups by key with an ordinary Stream.filter on the pairs: Stream.filter(([key]) => predicate(key))."
|
|
effect/GroupBy#first:
|
|
replacement: "Stream.take"
|
|
note: "Keep only the first n groups with an ordinary Stream.take(n) on the [key, stream] pair stream."
|
|
effect/GroupBy#make:
|
|
replacement: "none"
|
|
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."
|