@byloth/core 2.0.0-rc.2 → 2.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { SmartIterator } from "../iterators/index.js";
2
- import type { GeneratorFunction } from "../iterators/types.js";
2
+ import type { GeneratorFunction, IteratorLike } from "../iterators/types.js";
3
3
 
4
4
  import ReducedIterator from "./reduced-iterator.js";
5
- import type { KeyIteratee, KeyTypeGuardIteratee, KeyReducer } from "./types.js";
5
+ import type { KeyedIteratee, KeyedTypeGuardIteratee, KeyedReducer } from "./types.js";
6
6
 
7
7
  export default class AggregatedIterator<K extends PropertyKey, T>
8
8
  {
@@ -11,58 +11,52 @@ export default class AggregatedIterator<K extends PropertyKey, T>
11
11
  public constructor(iterable: Iterable<[K, T]>);
12
12
  public constructor(iterator: Iterator<[K, T]>);
13
13
  public constructor(generatorFn: GeneratorFunction<[K, T]>);
14
- public constructor(argument: Iterable<[K, T]> | Iterator<[K, T]> | GeneratorFunction<[K, T]>);
15
- public constructor(argument: Iterable<[K, T]> | Iterator<[K, T]> | GeneratorFunction<[K, T]>)
14
+ public constructor(argument: IteratorLike<[K, T]> | GeneratorFunction<[K, T]>);
15
+ public constructor(argument: IteratorLike<[K, T]> | GeneratorFunction<[K, T]>)
16
16
  {
17
17
  this._elements = new SmartIterator(argument);
18
18
  }
19
19
 
20
- public every(predicate: KeyIteratee<K, T, boolean>): ReducedIterator<K, boolean>
20
+ public every(predicate: KeyedIteratee<K, T, boolean>): ReducedIterator<K, boolean>
21
21
  {
22
- const indexes = new Map<K, [number, boolean]>();
22
+ const values = new Map<K, [number, boolean]>();
23
23
 
24
24
  for (const [key, element] of this._elements)
25
25
  {
26
- const [index, result] = indexes.get(key) ?? [0, true];
26
+ const [index, result] = values.get(key) ?? [0, true];
27
27
 
28
28
  if (!(result)) { continue; }
29
29
 
30
- indexes.set(key, [index + 1, predicate(key, element, index)]);
30
+ values.set(key, [index + 1, predicate(key, element, index)]);
31
31
  }
32
32
 
33
33
  return new ReducedIterator(function* ()
34
34
  {
35
- for (const [key, [_, result]] of indexes)
36
- {
37
- yield [key, result];
38
- }
35
+ for (const [key, [_, result]] of values) { yield [key, result]; }
39
36
  });
40
37
  }
41
- public some(predicate: KeyIteratee<K, T, boolean>): ReducedIterator<K, boolean>
38
+ public some(predicate: KeyedIteratee<K, T, boolean>): ReducedIterator<K, boolean>
42
39
  {
43
- const indexes = new Map<K, [number, boolean]>();
40
+ const values = new Map<K, [number, boolean]>();
44
41
 
45
42
  for (const [key, element] of this._elements)
46
43
  {
47
- const [index, result] = indexes.get(key) ?? [0, false];
44
+ const [index, result] = values.get(key) ?? [0, false];
48
45
 
49
46
  if (result) { continue; }
50
47
 
51
- indexes.set(key, [index + 1, predicate(key, element, index)]);
48
+ values.set(key, [index + 1, predicate(key, element, index)]);
52
49
  }
53
50
 
54
51
  return new ReducedIterator(function* ()
55
52
  {
56
- for (const [key, [_, result]] of indexes)
57
- {
58
- yield [key, result];
59
- }
53
+ for (const [key, [_, result]] of values) { yield [key, result]; }
60
54
  });
61
55
  }
62
56
 
63
- public filter(predicate: KeyIteratee<K, T, boolean>): AggregatedIterator<K, T>;
64
- public filter<S extends T>(predicate: KeyTypeGuardIteratee<K, T, S>): AggregatedIterator<K, S>;
65
- public filter(predicate: KeyIteratee<K, T, boolean>): AggregatedIterator<K, T>
57
+ public filter(predicate: KeyedIteratee<K, T, boolean>): AggregatedIterator<K, T>;
58
+ public filter<S extends T>(predicate: KeyedTypeGuardIteratee<K, T, S>): AggregatedIterator<K, S>;
59
+ public filter(predicate: KeyedIteratee<K, T, boolean>): AggregatedIterator<K, T>
66
60
  {
67
61
  const elements = this._elements;
68
62
 
@@ -74,13 +68,13 @@ export default class AggregatedIterator<K extends PropertyKey, T>
74
68
  {
75
69
  const index = indexes.get(key) ?? 0;
76
70
 
77
- indexes.set(key, index + 1);
78
-
79
71
  if (predicate(key, element, index)) { yield [key, element]; }
72
+
73
+ indexes.set(key, index + 1);
80
74
  }
81
75
  });
82
76
  }
83
- public map<V>(iteratee: KeyIteratee<K, T, V>): AggregatedIterator<K, V>
77
+ public map<V>(iteratee: KeyedIteratee<K, T, V>): AggregatedIterator<K, V>
84
78
  {
85
79
  const elements = this._elements;
86
80
 
@@ -92,29 +86,24 @@ export default class AggregatedIterator<K extends PropertyKey, T>
92
86
  {
93
87
  const index = indexes.get(key) ?? 0;
94
88
 
95
- indexes.set(key, index + 1);
96
-
97
89
  yield [key, iteratee(key, element, index)];
90
+
91
+ indexes.set(key, index + 1);
98
92
  }
99
93
  });
100
94
  }
101
- public reduce(reducer: KeyReducer<K, T, T>): ReducedIterator<K, T>;
102
- public reduce<A>(reducer: KeyReducer<K, T, A>, initialValue: (key: K) => A): ReducedIterator<K, A>;
103
- public reduce<A>(reducer: KeyReducer<K, T, A>, initialValue?: (key: K) => A): ReducedIterator<K, A>
95
+ public reduce(reducer: KeyedReducer<K, T, T>): ReducedIterator<K, T>;
96
+ public reduce<A>(reducer: KeyedReducer<K, T, A>, initialValue: (key: K) => A): ReducedIterator<K, A>;
97
+ public reduce<A>(reducer: KeyedReducer<K, T, A>, initialValue?: (key: K) => A): ReducedIterator<K, A>
104
98
  {
105
- const accumulators = new Map<K, [number, A]>();
99
+ const values = new Map<K, [number, A]>();
106
100
 
107
101
  for (const [key, element] of this._elements)
108
102
  {
109
103
  let index: number;
110
104
  let accumulator: A;
111
105
 
112
- if (accumulators.has(key))
113
- {
114
- [index, accumulator] = accumulators.get(key)!;
115
-
116
- index += 1;
117
- }
106
+ if (values.has(key)) { [index, accumulator] = values.get(key)!; }
118
107
  else if (initialValue !== undefined)
119
108
  {
120
109
  index = 0;
@@ -122,103 +111,166 @@ export default class AggregatedIterator<K extends PropertyKey, T>
122
111
  }
123
112
  else
124
113
  {
125
- accumulators.set(key, [0, (element as unknown) as A]);
114
+ values.set(key, [0, (element as unknown) as A]);
126
115
 
127
116
  continue;
128
117
  }
129
118
 
130
- accumulator = reducer(key, accumulator, element, index);
131
-
132
- accumulators.set(key, [index, accumulator]);
119
+ values.set(key, [index + 1, reducer(key, accumulator, element, index)]);
133
120
  }
134
121
 
135
122
  return new ReducedIterator(function* ()
136
123
  {
137
- for (const [key, [_, accumulator]] of accumulators)
138
- {
139
- yield [key, accumulator];
140
- }
124
+ for (const [key, [_, accumulator]] of values) { yield [key, accumulator]; }
141
125
  });
142
126
  }
143
127
 
144
- public unique(): AggregatedIterator<K, T>
128
+ public flatMap<V>(iteratee: KeyedIteratee<K, T, Iterable<V>>): AggregatedIterator<K, V>
145
129
  {
146
130
  const elements = this._elements;
147
131
 
148
132
  return new AggregatedIterator(function* ()
149
133
  {
150
- const keys = new Map<K, Set<T>>();
134
+ const indexes = new Map<K, number>();
151
135
 
152
136
  for (const [key, element] of elements)
153
137
  {
154
- const values = keys.get(key) ?? new Set<T>();
155
-
156
- if (values.has(element)) { continue; }
138
+ const index = indexes.get(key) ?? 0;
139
+ const values = iteratee(key, element, index);
157
140
 
158
- values.add(element);
159
- keys.set(key, values);
141
+ for (const value of values) { yield [key, value]; }
160
142
 
161
- yield [key, element];
143
+ indexes.set(key, index + 1);
162
144
  }
163
145
  });
164
146
  }
165
147
 
166
- public count(): ReducedIterator<K, number>
148
+ public drop(count: number): AggregatedIterator<K, T>
167
149
  {
168
- const counters = new Map<K, number>();
150
+ const elements = this._elements;
169
151
 
170
- for (const [key] of this._elements)
152
+ return new AggregatedIterator(function* ()
171
153
  {
172
- const count = counters.get(key) ?? 0;
154
+ const indexes = new Map<K, number>();
173
155
 
174
- counters.set(key, count + 1);
175
- }
156
+ for (const [key, element] of elements)
157
+ {
158
+ const index = indexes.get(key) ?? 0;
159
+ if (index < count)
160
+ {
161
+ indexes.set(key, index + 1);
176
162
 
177
- return new ReducedIterator(function* ()
163
+ continue;
164
+ }
165
+
166
+ yield [key, element];
167
+ }
168
+ });
169
+ }
170
+ public take(limit: number): AggregatedIterator<K, T>
171
+ {
172
+ const elements = this._elements;
173
+
174
+ return new AggregatedIterator(function* ()
178
175
  {
179
- for (const [key, count] of counters)
176
+ const indexes = new Map<K, number>();
177
+
178
+ for (const [key, element] of elements)
180
179
  {
181
- yield [key, count];
180
+ const index = indexes.get(key) ?? 0;
181
+ if (index >= limit)
182
+ {
183
+ if (indexes.values().every((value) => value >= limit)) { break; }
184
+
185
+ continue;
186
+ }
187
+
188
+ yield [key, element];
189
+
190
+ indexes.set(key, index + 1);
182
191
  }
183
192
  });
184
193
  }
185
- public first(): ReducedIterator<K, T>
194
+
195
+ public find(predicate: KeyedIteratee<K, T, boolean>): ReducedIterator<K, T | void>;
196
+ public find<S extends T>(predicate: KeyedTypeGuardIteratee<K, T, S>): ReducedIterator<K, S | void>;
197
+ public find(predicate: KeyedIteratee<K, T, boolean>): ReducedIterator<K, T | void>
186
198
  {
187
- const firsts = new Map<K, T>();
199
+ const values = new Map<K, [number, T | undefined]>();
188
200
 
189
201
  for (const [key, element] of this._elements)
190
202
  {
191
- if (firsts.has(key)) { continue; }
203
+ let [index, finding] = values.get(key) ?? [0, undefined];
204
+
205
+ if (finding !== undefined) { continue; }
206
+ if (predicate(key, element, index)) { finding = element; }
192
207
 
193
- firsts.set(key, element);
208
+ values.set(key, [index + 1, finding]);
194
209
  }
195
210
 
196
211
  return new ReducedIterator(function* ()
197
212
  {
198
- for (const [key, element] of firsts)
213
+ for (const [key, [_, finding]] of values) { yield [key, finding]; }
214
+ });
215
+ }
216
+
217
+ public enumerate(): AggregatedIterator<K, [number, T]>
218
+ {
219
+ return this.map((_, value, index) => [index, value]);
220
+ }
221
+ public unique(): AggregatedIterator<K, T>
222
+ {
223
+ const elements = this._elements;
224
+
225
+ return new AggregatedIterator(function* ()
226
+ {
227
+ const keys = new Map<K, Set<T>>();
228
+
229
+ for (const [key, element] of elements)
199
230
  {
231
+ const values = keys.get(key) ?? new Set<T>();
232
+
233
+ if (values.has(element)) { continue; }
234
+
235
+ values.add(element);
236
+ keys.set(key, values);
237
+
200
238
  yield [key, element];
201
239
  }
202
240
  });
203
241
  }
204
- public last(): ReducedIterator<K, T>
242
+
243
+ public count(): ReducedIterator<K, number>
205
244
  {
206
- const lasts = new Map<K, T>();
245
+ const counters = new Map<K, number>();
207
246
 
208
- for (const [key, element] of this._elements)
247
+ for (const [key] of this._elements)
209
248
  {
210
- lasts.set(key, element);
249
+ const count = counters.get(key) ?? 0;
250
+
251
+ counters.set(key, count + 1);
211
252
  }
212
253
 
213
254
  return new ReducedIterator(function* ()
214
255
  {
215
- for (const [key, element] of lasts)
216
- {
217
- yield [key, element];
218
- }
256
+ for (const [key, count] of counters) { yield [key, count]; }
219
257
  });
220
258
  }
221
259
 
260
+ public forEach(iteratee: KeyedIteratee<K, T>): void
261
+ {
262
+ const indexes = new Map<K, number>();
263
+
264
+ for (const [key, element] of this._elements)
265
+ {
266
+ const index = indexes.get(key) ?? 0;
267
+
268
+ iteratee(key, element, index);
269
+
270
+ indexes.set(key, index + 1);
271
+ }
272
+ }
273
+
222
274
  public keys(): SmartIterator<K>
223
275
  {
224
276
  const elements = this._elements;
@@ -246,16 +298,15 @@ export default class AggregatedIterator<K extends PropertyKey, T>
246
298
 
247
299
  return new SmartIterator<T>(function* ()
248
300
  {
249
- for (const [_, element] of elements)
250
- {
251
- yield element;
252
- }
301
+ for (const [_, element] of elements) { yield element; }
253
302
  });
254
303
  }
255
304
 
256
305
  public toArray(): T[][]
257
306
  {
258
- return Array.from(this.toMap().values());
307
+ const map = this.toMap();
308
+
309
+ return Array.from(map.values());
259
310
  }
260
311
  public toMap(): Map<K, T[]>
261
312
  {
@@ -1,7 +1,5 @@
1
- import Aggregator from "./aggregator.js";
2
- import AsyncAggregator from "./async-aggregator.js";
3
1
  import AggregatedIterator from "./aggregated-iterator.js";
4
2
  import AggregatedAsyncIterator from "./aggregated-async-iterator.js";
5
3
  import ReducedIterator from "./reduced-iterator.js";
6
4
 
7
- export { Aggregator, AsyncAggregator, AggregatedIterator, AggregatedAsyncIterator, ReducedIterator };
5
+ export { AggregatedIterator, AggregatedAsyncIterator, ReducedIterator };
@@ -2,7 +2,8 @@ import { ValueException } from "../exceptions/index.js";
2
2
  import { SmartIterator } from "../iterators/index.js";
3
3
  import type { GeneratorFunction } from "../iterators/types.js";
4
4
 
5
- import type { KeyIteratee, KeyReducer, KeyTypeGuardIteratee } from "./types.js";
5
+ import AggregatedIterator from "./aggregated-iterator.js";
6
+ import type { KeyedIteratee, KeyedReducer, KeyedTypeGuardIteratee } from "./types.js";
6
7
 
7
8
  export default class ReducedIterator<K extends PropertyKey, T>
8
9
  {
@@ -17,56 +18,64 @@ export default class ReducedIterator<K extends PropertyKey, T>
17
18
  this._elements = new SmartIterator(argument);
18
19
  }
19
20
 
20
- public filter(predicate: KeyIteratee<K, T, boolean>): ReducedIterator<K, T>;
21
- public filter<S extends T>(predicate: KeyTypeGuardIteratee<K, T, S>): ReducedIterator<K, S>;
22
- public filter(predicate: KeyIteratee<K, T, boolean>): ReducedIterator<K, T>
21
+ public every(predicate: KeyedIteratee<K, T, boolean>): boolean
23
22
  {
24
- const elements = this._elements;
23
+ for (const [index, [key, element]] of this._elements.enumerate())
24
+ {
25
+ if (!(predicate(key, element, index))) { return false; }
26
+ }
27
+
28
+ return true;
29
+ }
30
+ public some(predicate: KeyedIteratee<K, T, boolean>): boolean
31
+ {
32
+ for (const [index, [key, element]] of this._elements.enumerate())
33
+ {
34
+ if (predicate(key, element, index)) { return true; }
35
+ }
36
+
37
+ return false;
38
+ }
39
+
40
+ public filter(predicate: KeyedIteratee<K, T, boolean>): ReducedIterator<K, T>;
41
+ public filter<S extends T>(predicate: KeyedTypeGuardIteratee<K, T, S>): ReducedIterator<K, S>;
42
+ public filter(predicate: KeyedIteratee<K, T, boolean>): ReducedIterator<K, T>
43
+ {
44
+ const elements = this._elements.enumerate();
25
45
 
26
46
  return new ReducedIterator(function* ()
27
47
  {
28
- for (const [index, [key, element]] of elements.enumerate())
48
+ for (const [index, [key, element]] of elements)
29
49
  {
30
- if (predicate(key, element, index))
31
- {
32
- yield [key, element];
33
- }
50
+ if (predicate(key, element, index)) { yield [key, element]; }
34
51
  }
35
52
  });
36
53
  }
37
- public map<V>(iteratee: KeyIteratee<K, T, V>): ReducedIterator<K, V>
54
+ public map<V>(iteratee: KeyedIteratee<K, T, V>): ReducedIterator<K, V>
38
55
  {
39
- const elements = this._elements;
56
+ const elements = this._elements.enumerate();
40
57
 
41
58
  return new ReducedIterator(function* ()
42
59
  {
43
- for (const [index, [key, element]] of elements.enumerate())
60
+ for (const [index, [key, element]] of elements)
44
61
  {
45
62
  yield [key, iteratee(key, element, index)];
46
63
  }
47
64
  });
48
65
  }
49
- public reduce(reducer: KeyReducer<K, T, T>): T;
50
- public reduce<A>(reducer: KeyReducer<K, T, A>, initialValue: A): A;
51
- public reduce<A>(reducer: KeyReducer<K, T, A>, initialValue?: A): A
66
+ public reduce(reducer: KeyedReducer<K, T, T>): T;
67
+ public reduce<A>(reducer: KeyedReducer<K, T, A>, initialValue: A): A;
68
+ public reduce<A>(reducer: KeyedReducer<K, T, A>, initialValue?: A): A
52
69
  {
53
70
  let index = 0;
54
- let accumulator: A;
55
-
56
- if (initialValue !== undefined)
71
+ let accumulator = initialValue;
72
+ if (accumulator === undefined)
57
73
  {
58
- accumulator = initialValue;
59
- }
60
- else
61
- {
62
- const firstElement = this._elements.next();
63
- if (firstElement.done)
64
- {
65
- throw new ValueException("Cannot reduce an empty iterator without an initial value.");
66
- }
74
+ const result = this._elements.next();
75
+ if (result.done) { throw new ValueException("Cannot reduce an empty iterator without an initial value."); }
67
76
 
77
+ accumulator = (result.value[1] as unknown) as A;
68
78
  index += 1;
69
- accumulator = (firstElement.value[1] as unknown) as A;
70
79
  }
71
80
 
72
81
  for (const [key, element] of this._elements)
@@ -79,6 +88,85 @@ export default class ReducedIterator<K extends PropertyKey, T>
79
88
  return accumulator;
80
89
  }
81
90
 
91
+ public flatMap<V>(iteratee: KeyedIteratee<K, T, Iterable<V>>): AggregatedIterator<K, V>
92
+ {
93
+ const elements = this._elements.enumerate();
94
+
95
+ return new AggregatedIterator(function* ()
96
+ {
97
+ for (const [index, [key, element]] of elements)
98
+ {
99
+ for (const value of iteratee(key, element, index)) { yield [key, value]; }
100
+ }
101
+ });
102
+ }
103
+
104
+ public drop(count: number): ReducedIterator<K, T>
105
+ {
106
+ const elements = this._elements.enumerate();
107
+
108
+ return new ReducedIterator(function* ()
109
+ {
110
+ for (const [index, [key, element]] of elements)
111
+ {
112
+ if (index >= count) { yield [key, element]; }
113
+ }
114
+ });
115
+ }
116
+ public take(count: number): ReducedIterator<K, T>
117
+ {
118
+ const elements = this._elements.enumerate();
119
+
120
+ return new ReducedIterator(function* ()
121
+ {
122
+ for (const [index, [key, element]] of elements)
123
+ {
124
+ if (index >= count) { break; }
125
+
126
+ yield [key, element];
127
+ }
128
+ });
129
+ }
130
+
131
+ public enumerate(): ReducedIterator<K, [number, T]>
132
+ {
133
+ return this.map((_, element, index) => [index, element]);
134
+ }
135
+ public unique(): ReducedIterator<K, T>
136
+ {
137
+ const elements = this._elements;
138
+
139
+ return new ReducedIterator(function* ()
140
+ {
141
+ const values = new Set<T>();
142
+
143
+ for (const [key, element] of elements)
144
+ {
145
+ if (values.has(element)) { continue; }
146
+ values.add(element);
147
+
148
+ yield [key, element];
149
+ }
150
+ });
151
+ }
152
+
153
+ public count(): number
154
+ {
155
+ let index = 0;
156
+
157
+ for (const _ of this._elements) { index += 1; }
158
+
159
+ return index;
160
+ }
161
+
162
+ public forEach(iteratee: KeyedIteratee<K, T>): void
163
+ {
164
+ for (const [index, [key, element]] of this._elements.enumerate())
165
+ {
166
+ iteratee(key, element, index);
167
+ }
168
+ }
169
+
82
170
  public keys(): SmartIterator<K>
83
171
  {
84
172
  const elements = this._elements;
@@ -1,14 +1,19 @@
1
+ /* eslint-disable max-len */
2
+
1
3
  import type { MaybePromise } from "../promises/types.js";
2
4
 
3
- export type KeyIteratee<K extends PropertyKey, T, R = void> = (key: K, value: T, index: number) => R;
4
- export type MaybeAsyncKeyIteratee<K extends PropertyKey, T, R = void> = (key: K, value: T, index: number) =>
5
- MaybePromise<R>;
5
+ export type KeyedIteratee<K extends PropertyKey, T, R = void> = (key: K, value: T, index: number) => R;
6
+ export type AsyncKeyedIteratee<K extends PropertyKey, T, R = void> = (key: K, value: T, index: number) => Promise<R>;
7
+ export type MaybeAsyncKeyedIteratee<K extends PropertyKey, T, R = void> = (key: K, value: T, index: number) => MaybePromise<R>;
8
+
9
+ export type KeyedTypeGuardIteratee<K extends PropertyKey, T, R extends T> = (key: K, value: T, index: number) => value is R;
10
+
11
+ // @ts-expect-error - This is an asyncronous type guard keyed-iteratee that guarantees the return value is a promise.
12
+ export type AsyncKeyedTypeGuardIteratee<K extends PropertyKey, T, R extends T> = (key: K, value: T, index: number) => value is Promise<R>;
6
13
 
7
- export type KeyTypeGuardIteratee<K extends PropertyKey, T, R extends T> =
8
- (key: K, value: T, index: number) => value is R;
9
- export type MaybeAsyncKeyTypeGuardIteratee<K extends PropertyKey, T, R extends T> =
10
- (key: K, value: MaybePromise<T>, index: number) => value is Awaited<R>;
14
+ // @ts-expect-error - This may be an asyncronous type guard keyed-iteratee that guarantees the return value may be a promise.
15
+ export type MaybeAsyncKeyedTypeGuardIteratee<K extends PropertyKey, T, R extends T> = (key: K, value: T, index: number) => value is MaybePromise<R>;
11
16
 
12
- export type KeyReducer<K extends PropertyKey, T, A> = (key: K, accumulator: A, value: T, index: number) => A;
13
- export type MaybeAsyncKeyReducer<K extends PropertyKey, T, A> =
14
- (key: K, accumulator: A, value: T, index: number) => MaybePromise<A>;
17
+ export type KeyedReducer<K extends PropertyKey, T, A> = (key: K, accumulator: A, value: T, index: number) => A;
18
+ export type AsyncKeyedReducer<K extends PropertyKey, T, A> = (key: K, accumulator: A, value: T, index: number) => Promise<A>;
19
+ export type MaybeAsyncKeyedReducer<K extends PropertyKey, T, A> = (key: K, accumulator: A, value: T, index: number) => MaybePromise<A>;
@@ -1,6 +1,4 @@
1
1
  export {
2
- Aggregator,
3
- AsyncAggregator,
4
2
  AggregatedIterator,
5
3
  AggregatedAsyncIterator,
6
4
  ReducedIterator