Function: mapConcur()
Returns a concur iterable containing the values of concurIterable
transformed by fn
in iteration order.
Like Array.prototype.map
, but for concur iterables.
Example
console.log(
await pipe(
asConcur([`sloth`, `more sloth`, `even more sloth`]),
mapConcur(string => string.length),
reduceConcur(toArray()),
),
)
//=> [ 5, 10, 15 ]
Since
v0.0.1
Call Signature
mapConcur<
From
,To
>(fn
): (concurIterable
) =>ConcurIterable
<To
>
Type Parameters
• From
• To extends [] | unknown
[]
Parameters
fn
(value
) => MaybePromiseLike
<To
>
Returns
Function
Parameters
concurIterable
ConcurIterable
<From
>
Returns
ConcurIterable
<To
>
Defined in
Call Signature
mapConcur<
From
,To
>(fn
,concurIterable
):ConcurIterable
<To
>
Type Parameters
• From
• To extends [] | unknown
[]
Parameters
fn
(value
) => MaybePromiseLike
<To
>
concurIterable
ConcurIterable
<From
>
Returns
ConcurIterable
<To
>
Defined in
Call Signature
mapConcur<
From
,To
>(fn
): (concurIterable
) =>ConcurIterable
<To
>
Type Parameters
• From
• To
Parameters
fn
(value
) => MaybePromiseLike
<To
>
Returns
Function
Parameters
concurIterable
ConcurIterable
<From
>
Returns
ConcurIterable
<To
>
Defined in
Call Signature
mapConcur<
From
,To
>(fn
,concurIterable
):ConcurIterable
<To
>
Type Parameters
• From
• To
Parameters
fn
(value
) => MaybePromiseLike
<To
>
concurIterable
ConcurIterable
<From
>
Returns
ConcurIterable
<To
>