Skip to content

combination

combination<T>(items, k): T[]

Defined in: src/global/collections.ts:104

k distinct elements, kept in their original order.

T

Collection<T>

number

T[]

combination([1, 2, 3, 4, 5], 3); // [ 1, 4, 5 ]