mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-27 04:17:51 -07:00
Fix comment
This commit is contained in:
parent
9afe3aa109
commit
47ba59a6ed
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ export function maximum(xs: number[]): number {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Splits an array based on the equivalence relation.
|
* Splits an array based on the equivalence relation.
|
||||||
* The concatenation of the result equals to the argument.
|
* The concatenation of the result is equal to the argument.
|
||||||
*/
|
*/
|
||||||
export function groupBy<T>(f: (x: T, y: T) => boolean, xs: T[]): T[][] {
|
export function groupBy<T>(f: (x: T, y: T) => boolean, xs: T[]): T[][] {
|
||||||
const groups = [] as T[][];
|
const groups = [] as T[][];
|
||||||
|
@ -75,7 +75,7 @@ export function groupBy<T>(f: (x: T, y: T) => boolean, xs: T[]): T[][] {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Splits an array based on the equivalence relation induced by the function.
|
* Splits an array based on the equivalence relation induced by the function.
|
||||||
* The concatenation of the result equals to the argument.
|
* The concatenation of the result is equal to the argument.
|
||||||
*/
|
*/
|
||||||
export function groupOn<T, S>(f: (x: T) => S, xs: T[]): T[][] {
|
export function groupOn<T, S>(f: (x: T) => S, xs: T[]): T[][] {
|
||||||
return groupBy((a, b) => f(a) === f(b), xs);
|
return groupBy((a, b) => f(a) === f(b), xs);
|
||||||
|
|
Loading…
Reference in a new issue