@combinatorics/n-combinations
v1.0.1
Published
Set n-combinations for JavaScript
Downloads
41
Readme
:hippopotamus: @combinatorics/n-combinations
Set n-combinations for JavaScript. See docs.
:warning: Depending on your environment, the code may require
regeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime.
import {combinations} from '@combinatorics/n-combinations';
combinations("ABCD", 2); // AB AC AD BC BD CD
import {range} from '@iterable-iterator/range';
combinations(range(4), 3); // 012 013 023 123