-
Couldn't load subscription status.
- Fork 90
Closed
Description
Current documentation:
map<T extends IterableContainer, U>(
fn: (value: T[number], index: number) => U,
): (data: T) => Mapped<T, U>
It returns the result of looping through iterable with fn.
It works with both array and object.
const fn = x => x * 2
const iterable = [1, 2]
const obj = {a: 1, b: 2}
const result = R.map(fn)(iterable),
// => [2, 4]
The function doesn't work with objects (use mapObject instead)
Metadata
Metadata
Assignees
Labels
No labels