Skip to main content
Module

x/ramda/source/reduceWhile.js

:ram: Practical functional Javascript
Latest
import * as mod from "https://deno.land/x/ramda@v0.27.2/source/reduceWhile.js";

Variables

Like reduce, reduceWhile returns a single item by iterating through the list, successively calling the iterator function. reduceWhile also takes a predicate that is evaluated before each step. If the predicate returns false, it "short-circuits" the iteration and returns the current value of the accumulator.