@beenotung/tslib
Version:
utils library in Typescript
10 lines (9 loc) • 434 B
TypeScript
/**
* @description combination: order doesn't matter
* @description known bug: will have integer overflow when the list is too long
*/
export declare function any_combinations<T>(xs: T[]): T[][];
/** @description combination: order doesn't matter */
export declare function n_combinations<T>(n: number, xs: T[]): T[][];
/** @deprecated renamed to `any_combinations` */
export declare const combinations: typeof any_combinations;