Function: eachConcur()
Returns an concur iterable equivalent to concurIterable
that applies fn
to each value of concurIterable
as it is iterated.
The result of applying fn
to a value is awaited before yielding.
Example
const eachedSloths = await pipe(
asConcur([`carl`, `frank`, `phil`]),
eachConcur(console.log),
reduceConcur(toArray()),
)
//=> carl
//=> frank
//=> phil
console.log(eachedSloths)
//=> [ 'carl', 'frank', 'phil' ]
eachConcur(fn)
eachConcur<
Value
>(fn
): (concurIterable
) =>ConcurIterable
<Value
>
Returns an concur iterable equivalent to concurIterable
that applies fn
to each value of concurIterable
as it is iterated.
The result of applying fn
to a value is awaited before yielding.
Type Parameters
• Value
Parameters
• fn
Returns
Function
Parameters
• concurIterable: ConcurIterable
<Value
>
Returns
ConcurIterable
<Value
>
Example
const eachedSloths = await pipe(
asConcur([`carl`, `frank`, `phil`]),
eachConcur(console.log),
reduceConcur(toArray()),
)
//=> carl
//=> frank
//=> phil
console.log(eachedSloths)
//=> [ 'carl', 'frank', 'phil' ]
Defined in
eachConcur(fn, concurIterable)
eachConcur<
Value
>(fn
,concurIterable
):ConcurIterable
<Value
>
Returns an concur iterable equivalent to concurIterable
that applies fn
to each value of concurIterable
as it is iterated.
The result of applying fn
to a value is awaited before yielding.
Type Parameters
• Value
Parameters
• fn
• concurIterable: ConcurIterable
<Value
>
Returns
ConcurIterable
<Value
>
Example
const eachedSloths = await pipe(
asConcur([`carl`, `frank`, `phil`]),
eachConcur(console.log),
reduceConcur(toArray()),
)
//=> carl
//=> frank
//=> phil
console.log(eachedSloths)
//=> [ 'carl', 'frank', 'phil' ]
Defined in
eachConcur(fn)
eachConcur<
From
,To
>(fn
): (concurIterable
) =>ConcurIterable
<To
>
Returns an concur iterable equivalent to concurIterable
that applies fn
to each value of concurIterable
as it is iterated.
The result of applying fn
to a value is awaited before yielding.
Type Parameters
• From
• To
Parameters
• fn
Returns
Function
Parameters
• concurIterable: ConcurIterable
<From
>
Returns
ConcurIterable
<To
>
Example
const eachedSloths = await pipe(
asConcur([`carl`, `frank`, `phil`]),
eachConcur(console.log),
reduceConcur(toArray()),
)
//=> carl
//=> frank
//=> phil
console.log(eachedSloths)
//=> [ 'carl', 'frank', 'phil' ]
Defined in
eachConcur(fn, concurIterable)
eachConcur<
From
,To
>(fn
,concurIterable
):ConcurIterable
<To
>
Returns an concur iterable equivalent to concurIterable
that applies fn
to each value of concurIterable
as it is iterated.
The result of applying fn
to a value is awaited before yielding.
Type Parameters
• From
• To
Parameters
• fn
• concurIterable: ConcurIterable
<From
>
Returns
ConcurIterable
<To
>
Example
const eachedSloths = await pipe(
asConcur([`carl`, `frank`, `phil`]),
eachConcur(console.log),
reduceConcur(toArray()),
)
//=> carl
//=> frank
//=> phil
console.log(eachedSloths)
//=> [ 'carl', 'frank', 'phil' ]