map-accum-right
v0.9.6arrow_drop_downv0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
969 B
The `mapAccumRight` function behaves like a combination of map and reduce; it
1 contributor
Like
Install map-accum-right as a package?
Copied
npm i @bit/justin-capalbo.ramda.map-accum-right
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
mapAccumRight (
fn:
Function
,acc:
*
,list:
) : Array
*
The mapAccumRight
function behaves like a combination of map and reduce; it
applies a function to each element of a list, passing an accumulating
parameter from right to left, and returning a final value of this
accumulator together with the new list.
Similar to mapAccum
, except moves through the input list from
the right to the left.
The iterator function receives two arguments, acc and value, and should return a tuple [acc, value].
Example
Arguments
fn:
Function
The function to be called on every element of the input list
.
acc:
*
The accumulator value.
list:
Array
The list to iterate over.
Returns
*
The final, accumulated value.