Skip to main content

Variable: takeConcur

const takeConcur: SubConcur

Defined in: splices.d.ts:327

Returns a concur iterable containing the first count values of concurIterable in iteration order.

If the count is greater than the number of values in concurIterable, then a concur iterable equivalent concurIterable is returned.

Throws

if count isn't a non-negative integer.

Example

console.log(
await pipe(
asConcur([1, 2, 3, 4, 5, `sloth`]),
takeConcur(3),
reduceConcur(toArray()),
),
)
//=> [ 1, 2, 3 ]

Since

v0.0.2