Skip to content

Commit 9d89581

Browse files
📚 docs(README): Progress on API design.
1 parent 07face9 commit 9d89581

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,25 @@ See [docs](https://aureooms.github.io/js-set-partition/index.html).
2323
2424
```js
2525
import {range, map} from '@aureooms/js-itertools';
26-
import {partitions, npartitions, bell, isPartition} from '@aureooms/js-set-partition';
26+
import {enumerate, count, sequence, isPartition} from '@aureooms/js-set-partition';
2727

28-
partitions(range(0)); // []
29-
partitions(range(1)); // [[0]]
30-
partitions(range(2)); // [[0], [1]] [[0, 1]]
28+
enumerate(range(0)); // []
29+
enumerate(range(1)); // [[0]]
30+
enumerate(range(2)); // [[0], [1]] [[0, 1]]
3131

32-
npartitions(0); // 1
33-
npartitions(1); // 1
34-
npartitions(2); // 2
35-
npartitions(3); // 5
36-
npartitions(4); // 15
37-
npartitions(5); // 52
38-
npartitions(6); // 203
39-
npartitions(26); // 49631246523618756274n
32+
count(0); // 1n
33+
count(1); // 1n
34+
count(2); // 2n
35+
count(3); // 5n
36+
count(4); // 15n
37+
count(5); // 52n
38+
count(6); // 203n
39+
count(26); // 49631246523618756274n
4040

41-
bell(); // 1 2 3 5 15 52 203 ...
41+
_count(6); // 203
42+
_count(26); // ???
43+
44+
sequence(); // 1n 1n 2n 3n 5n 15n 52n 203n ...
4245

4346
isPartition(range(5), [range(5)]); // true
4447
isPartition(range(5), map(x => [x], range(5))); // true

0 commit comments

Comments
 (0)