1 | import { IterableX } from './iterablex';
|
2 | export class ConcatIterable extends IterableX {
|
3 | constructor(source) {
|
4 | super();
|
5 | this._source = source;
|
6 | }
|
7 | *[Symbol.iterator]() {
|
8 | for (const outer of this._source) {
|
9 | yield* outer;
|
10 | }
|
11 | }
|
12 | }
|
13 | /**
|
14 | * Concatenates all iterable sequences in the given sequences, as long as the previous iterable
|
15 | * sequence terminated successfully.
|
16 | *
|
17 | * @export
|
18 | * @template T The type of the elements in the sequences.
|
19 | * @param {...Iterable<T>[]} args The iterable sources.
|
20 | * @returns {IterableX<T>} An iterable sequence that contains the elements of each given sequence, in sequential order.
|
21 | */
|
22 | export function concat(...args) {
|
23 | return new ConcatIterable(args);
|
24 | }
|
25 |
|
26 | //# sourceMappingURL=concat.mjs.map
|