File tree 1 file changed +16
-13
lines changed 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -23,22 +23,25 @@ See [docs](https://aureooms.github.io/js-set-partition/index.html).
23
23
24
24
``` js
25
25
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' ;
27
27
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]]
31
31
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
40
40
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 ...
42
45
43
46
isPartition (range (5 ), [range (5 )]); // true
44
47
isPartition (range (5 ), map (x => [x], range (5 ))); // true
You can’t perform that action at this time.
0 commit comments