@set-theory/powerset
v1.0.0
Published
Powerset operator for JavaScript
Downloads
12
Readme
:bowling: @set-theory/powerset
Powerset operator 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 {count} from '@iterable-iterator/count';
import {powerset as subsets} from '@set-theory/powerset';
const naturalNumbers = count(0n, 1n);
for (const subset of subsets(naturalNumbers)) ... ;