fx-flow v0.7.0 / pipe/lazy / map
Function: map()
map(fn, iterable)
map<
A
,R
>(fn
,iterable
):IterableIterator
<R
>
Returns Iterable/AsyncIterable of values mapped by fn
.
Type parameters
• A
• R
Parameters
• fn
• iterable: Iterable
<A
>
Returns
Example
typescript
pipe(
[1, 2, 3, 4],
map(a => a + 10),
toArray,
); // [11, 12, 13, 14]
Source
packages/core/src/pipe/lazy/map.ts:66
map(fn, iterable)
map<
A
,R
>(fn
,iterable
):AsyncIterableIterator
<Awaited
<R
>>
Type parameters
• A
• R
Parameters
• fn
• iterable: AsyncIterable
<A
>
Returns
AsyncIterableIterator
<Awaited
<R
>>
Source
packages/core/src/pipe/lazy/map.ts:67
map(fn)
map<
A
,R
>(fn
): (iterable
) =>IteratorReturnValue
<A
,R
>
Type parameters
• A extends UniversalIterable
• R
Parameters
• fn
Returns
Function
Parameters
• iterable: A
Returns
IteratorReturnValue
<A
, R
>