Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/mod.ts>reduceBy

Faster and smaller alternative to Ramda
Go to Latest
function reduceBy
import { reduceBy } from "https://deno.land/x/rambda@9.2.1/mod.ts";

Parameters

valueFn: (acc: TResult, elem: T) => TResult

Returns

(
b: (elem: T) => string,
c: T[],
) => { [index: string]: TResult; }

Parameters

valueFn: (acc: TResult, elem: T) => TResult
acc: TResult

Returns

(a: (elem: T) => string, b: T[]) => { [index: string]: TResult; }

Parameters

valueFn: (acc: TResult, elem: T) => TResult
acc: TResult
keyFn: (elem: T) => string

Returns

(list: T[]) => { [index: string]: TResult; }

Parameters

valueFn: (acc: TResult, elem: T) => TResult
acc: TResult
keyFn: (elem: T) => string
list: T[]

Returns

{ [index: string]: TResult; }