Module

x/rambda/mod.ts>reduceBy

Faster and smaller alternative to Ramda
Go to Latest
function reduceBy
import { reduceBy } from "https://dotland.deno.dev/x/rambda@v9.2.0/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; }