Skip to main content

Variable: concat()

const concat: <Value>(...iterables) => Iterable<Value>

Defined in: splices.d.ts:1186

Returns an iterable that contains the values of each iterable in iterables in iteration order.

Like Array.prototype.concat, but for iterables.

Type Parameters

Value

Value

Parameters

iterables

...readonly Iterable<Value>[]

Returns

Iterable<Value>

Example

console.log(
pipe(
concat([1, 2], [3, `sloth`, 5], [6, 7]),
reduce(toArray()),
),
)
//=> [ 1, 2, 3, 'sloth', 5, 6, 7 ]

Since

v0.0.2