Skip to main content
Module

x/ramda/mod.ts>mapAccumRight

:ram: Practical functional Javascript
Latest
variable mapAccumRight
import { mapAccumRight } from "https://deno.land/x/ramda@v0.27.2/mod.ts";

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].