Skip to content

fx-flow v0.7.0 / pipe/lazy / concat

Function: concat()

concat(iterable1, iterable2)

concat<A, B>(iterable1, iterable2): ConcatReturnValue<A, B>

Return the result of concatenating the given iterable.

Type parameters

A extends UniversalIterable

B extends UniversalIterable

Parameters

iterable1: A

iterable2: B

Returns

ConcatReturnValue<A, B>

Example

typescript
const iter = concat([1, 2], [3, 4]);
iter.next() // {done:false, value: 1}
iter.next() // {done:false, value: 2}
iter.next() // {done:false, value: 3}
iter.next() // {done:false, value: 4}
iter.next() // {done:true, value: undefined}

More examples

Source

packages/core/src/pipe/lazy/concat.ts:62

concat(iterable1)

concat<A, B>(iterable1): (iterable2) => ConcatReturnValue<A, B>

Type parameters

A extends UniversalIterable

B extends UniversalIterable

Parameters

iterable1: A

Returns

Function

Parameters

iterable2: B

Returns

ConcatReturnValue<A, B>

Source

packages/core/src/pipe/lazy/concat.ts:67

Released under the MIT License.