1 contributor
Like
Install map as a package?
Copied
npm i @bit/justin-capalbo.ramda.map
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
map (
fn:
Function
,list:
) : Array
Array
Takes a function and a functor, applies the function to each of the functor’s values, and returns a functor of the same shape.
Ramda provides suitable map
implementations for Array
and Object
,
so this function may be applied to [1, 2, 3]
or {x: 1, y: 2, z: 3}
.
Dispatches to the map
method of the second argument, if present.
Acts as a transducer if a transformer is given in list position.
Also treats functions as functors and will compose them together.
Example
Arguments
fn:
Function
The function to be called on every element of the input list
.
list:
Array
The list to be iterated over.
Returns
Array
The new list.