declare const arr: ReadonlyArray<[key: string, value: number]>;
// Here, the same information now appears twice in the structure, once in the key of the record and once in the value
const groupBy1 = pipe(arr,ReadonlyArray.groupBy( ([key]) => key));
// Here the kay appears only once
const groupBy2 = pipe(arr,groupByAndProject(([key]) => key, ([_,value])=>value));
declare const arr: ReadonlyArray<[key: string, value: number]>;
// Here, the same information now appears twice in the structure, once in the key of the record and once in the value
const groupBy1 = pipe(arr,ReadonlyArray.groupBy( ([key]) => key));
// Here the kay appears only once
const groupBy2 = pipe(arr,groupByAndProject(([key]) => key, ([_,value])=>value));