Function: concat()
concat<
Value
>(...iterables
):Iterable
<Value
,any
,any
>
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
Parameters
• ...iterables: readonly Iterable
<Value
, any
, any
>[]
Returns
Iterable
<Value
, any
, any
>
Example
console.log(
pipe(
concat([1, 2], [3, `sloth`, 5], [6, 7]),
reduce(toArray()),
),
)
//=> [ 1, 2, 3, 'sloth', 5, 6, 7 ]