Skip to main content
Module

x/rambda/immutable.d.ts>groupBy

Faster and smaller alternative to Ramda
Go to Latest
function groupBy
import { groupBy } from "https://deno.land/x/rambda@v7.0.1/immutable.d.ts";

It splits list according to a provided groupFn function and returns an object.

Parameters

groupFn: (x: T) => string
list: readonly T[]

Returns

{ readonly [index: string]: readonly T[]; }

Parameters

groupFn: (x: T) => string

Returns

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

Parameters

groupFn: (x: T) => string
list: readonly T[]

Parameters

groupFn: (x: T) => string

Returns

(list: readonly T[]) => U