functionalscript 0.1.594 → 0.1.597

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/.github/workflows/npm-publish.yml +2 -1
  2. package/com/cpp/module.f.d.mts +8 -0
  3. package/com/cpp/module.f.mjs +18 -18
  4. package/com/cpp/test.f.d.mts +2 -0
  5. package/com/cpp/testlib.f.d.mts +2 -0
  6. package/com/cs/module.f.d.mts +8 -0
  7. package/com/cs/module.f.mjs +1 -1
  8. package/com/cs/test.f.d.mts +2 -0
  9. package/com/cs/testlib.f.d.mts +2 -0
  10. package/com/rust/module.f.d.mts +28 -0
  11. package/com/rust/module.f.mjs +30 -30
  12. package/com/rust/test.f.d.mts +2 -0
  13. package/com/rust/testlib.f.d.mts +2 -0
  14. package/com/test/build.d.mts +1 -0
  15. package/com/test/build.f.d.mts +26 -0
  16. package/com/test/build.mjs +2 -2
  17. package/com/types/module.f.d.mts +28 -0
  18. package/com/types/module.f.mjs +1 -1
  19. package/com/types/testlib.f.d.mts +44 -0
  20. package/commonjs/build/module.f.d.mts +24 -0
  21. package/commonjs/build/test.f.d.mts +3 -0
  22. package/commonjs/module/function/module.f.d.mts +7 -0
  23. package/commonjs/module/module.f.d.mts +57 -0
  24. package/commonjs/module/module.f.mjs +1 -1
  25. package/commonjs/module.d.mts +7 -0
  26. package/commonjs/module.f.d.mts +4 -0
  27. package/commonjs/package/dependencies/module.f.d.mts +10 -0
  28. package/commonjs/package/dependencies/module.f.mjs +3 -3
  29. package/commonjs/package/dependencies/test.f.d.mts +2 -0
  30. package/commonjs/package/module.f.d.mts +27 -0
  31. package/commonjs/package/module.f.mjs +4 -4
  32. package/commonjs/package/test.f.d.mts +2 -0
  33. package/commonjs/path/module.f.d.mts +67 -0
  34. package/commonjs/path/module.f.mjs +5 -5
  35. package/commonjs/path/test.f.d.mts +25 -0
  36. package/commonjs/path/test.f.mjs +7 -7
  37. package/commonjs/test.d.mts +8 -0
  38. package/commonjs/test.mjs +2 -2
  39. package/dev/index.d.mts +1 -0
  40. package/dev/module.d.mts +26 -0
  41. package/dev/module.f.d.mts +4 -0
  42. package/dev/test/module.f.d.mts +26 -0
  43. package/dev/test.d.mts +3 -0
  44. package/dev/test.f.d.mts +9 -0
  45. package/djs/module.f.d.mts +25 -0
  46. package/djs/module.f.mjs +1 -1
  47. package/djs/parser/module.f.d.mts +40 -0
  48. package/djs/parser/test.f.d.mts +8 -0
  49. package/djs/test.f.d.mts +12 -0
  50. package/djs/tokenizer/module.f.d.mts +17 -0
  51. package/djs/tokenizer/module.f.mjs +1 -1
  52. package/djs/tokenizer/test.f.d.mts +6 -0
  53. package/djs/tokenizer/test.f.mjs +1 -1
  54. package/fsc/module.f.d.mts +12 -0
  55. package/fsc/test.f.d.mts +4 -0
  56. package/fsm/module.f.d.mts +21 -0
  57. package/fsm/test.f.d.mts +5 -0
  58. package/html/module.f.d.mts +20 -0
  59. package/html/module.f.mjs +1 -1
  60. package/html/test.f.d.mts +10 -0
  61. package/index.f.d.mts +83 -0
  62. package/js/tokenizer/module.f.d.mts +150 -0
  63. package/js/tokenizer/test.f.d.mts +8 -0
  64. package/js/tokenizer/test.f.mjs +3 -3
  65. package/json/module.f.d.mts +41 -0
  66. package/json/parser/module.f.d.mts +36 -0
  67. package/json/parser/module.f.mjs +12 -12
  68. package/json/parser/test.f.d.mts +5 -0
  69. package/json/parser/test.f.mjs +2 -2
  70. package/json/serializer/module.f.d.mts +45 -0
  71. package/json/serializer/module.f.mjs +2 -2
  72. package/json/serializer/test.f.d.mts +8 -0
  73. package/json/test.f.d.mts +8 -0
  74. package/json/tokenizer/module.f.d.mts +17 -0
  75. package/json/tokenizer/module.f.mjs +7 -7
  76. package/json/tokenizer/test.f.d.mts +6 -0
  77. package/json/tokenizer/test.f.mjs +3 -3
  78. package/jsr.json +1 -1
  79. package/nodejs/version/main.d.mts +1 -0
  80. package/nodejs/version/module.f.d.mts +18 -0
  81. package/nodejs/version/test.f.d.mts +2 -0
  82. package/package.json +2 -1
  83. package/prime_field/module.f.d.mts +44 -0
  84. package/prime_field/test.f.d.mts +12 -0
  85. package/secp/module.f.d.mts +49 -0
  86. package/secp/module.f.mjs +6 -6
  87. package/secp/test.f.d.mts +4 -0
  88. package/secp/test.f.mjs +5 -5
  89. package/sha2/module.f.d.mts +23 -0
  90. package/sha2/module.f.mjs +1 -1
  91. package/sha2/test.f.d.mts +10 -0
  92. package/sha2/test.f.mjs +0 -1
  93. package/text/ascii/module.f.d.mts +73 -0
  94. package/text/ascii/test.f.d.mts +4 -0
  95. package/text/module.f.d.mts +18 -0
  96. package/text/sgr/module.f.d.mts +14 -0
  97. package/text/test.f.d.mts +2 -0
  98. package/text/utf16/module.f.d.mts +19 -0
  99. package/text/utf16/test.f.d.mts +6 -0
  100. package/text/utf16/test.f.mjs +2 -2
  101. package/text/utf8/module.f.d.mts +15 -0
  102. package/text/utf8/module.f.mjs +2 -2
  103. package/text/utf8/test.f.d.mts +6 -0
  104. package/types/array/module.f.d.mts +41 -0
  105. package/types/array/test.f.d.mts +10 -0
  106. package/types/bigfloat/module.f.d.mts +11 -0
  107. package/types/bigfloat/test.f.d.mts +6 -0
  108. package/types/bigint/module.f.d.mts +77 -0
  109. package/types/bigint/module.f.mjs +5 -5
  110. package/types/bigint/test.f.d.mts +16 -0
  111. package/types/btree/find/module.f.d.mts +42 -0
  112. package/types/btree/find/module.f.mjs +4 -4
  113. package/types/btree/find/test.f.d.mts +2 -0
  114. package/types/btree/find/test.f.mjs +2 -2
  115. package/types/btree/module.f.d.mts +9 -0
  116. package/types/btree/remove/module.f.d.mts +19 -0
  117. package/types/btree/remove/module.f.mjs +12 -12
  118. package/types/btree/remove/test.f.d.mts +7 -0
  119. package/types/btree/remove/test.f.mjs +5 -5
  120. package/types/btree/set/module.f.d.mts +9 -0
  121. package/types/btree/set/module.f.mjs +6 -6
  122. package/types/btree/set/test.f.d.mts +2 -0
  123. package/types/btree/set/test.f.mjs +32 -32
  124. package/types/btree/test.f.d.mts +13 -0
  125. package/types/btree/test.f.mjs +7 -11
  126. package/types/btree/types/module.f.d.mts +16 -0
  127. package/types/byte_set/module.f.d.mts +38 -0
  128. package/types/byte_set/module.f.mjs +2 -2
  129. package/types/byte_set/test.f.d.mts +13 -0
  130. package/types/byte_set/test.f.mjs +3 -3
  131. package/types/function/compare/module.f.d.mts +29 -0
  132. package/types/function/compare/module.f.mjs +4 -4
  133. package/types/function/compare/test.f.d.mts +2 -0
  134. package/types/function/module.f.d.mts +36 -0
  135. package/types/function/operator/module.f.d.mts +75 -0
  136. package/types/function/test.f.d.mts +2 -0
  137. package/types/list/module.f.d.mts +117 -0
  138. package/types/list/test.f.d.mts +38 -0
  139. package/types/map/module.f.d.mts +30 -0
  140. package/types/map/module.f.mjs +4 -4
  141. package/types/map/test.f.d.mts +5 -0
  142. package/types/nibble_set/module.f.d.mts +26 -0
  143. package/types/nibble_set/test.f.d.mts +13 -0
  144. package/types/nullable/module.f.d.mts +14 -0
  145. package/types/nullable/test.f.d.mts +2 -0
  146. package/types/number/module.f.d.mts +13 -0
  147. package/types/number/test.f.d.mts +11 -0
  148. package/types/object/module.f.d.mts +29 -0
  149. package/types/object/test.f.d.mts +5 -0
  150. package/types/range/module.f.d.mts +11 -0
  151. package/types/range/test.f.d.mts +2 -0
  152. package/types/range_map/module.f.d.mts +25 -0
  153. package/types/range_map/module.f.mjs +5 -5
  154. package/types/range_map/test.f.d.mts +6 -0
  155. package/types/range_map/test.f.mjs +2 -2
  156. package/types/result/module.d.mts +7 -0
  157. package/types/result/module.f.d.mts +28 -0
  158. package/types/sorted_list/module.f.d.mts +59 -0
  159. package/types/sorted_list/test.f.d.mts +5 -0
  160. package/types/sorted_list/test.f.mjs +2 -2
  161. package/types/sorted_set/module.f.d.mts +25 -0
  162. package/types/sorted_set/test.f.d.mts +6 -0
  163. package/types/sorted_set/test.f.mjs +1 -1
  164. package/types/string/module.f.d.mts +15 -0
  165. package/types/string/test.f.d.mts +15 -0
  166. package/types/string_set/module.f.d.mts +21 -0
  167. package/types/string_set/test.f.d.mts +5 -0
@@ -0,0 +1,38 @@
1
+ declare namespace _default {
2
+ export { empty };
3
+ export { universe };
4
+ export { has };
5
+ export { set };
6
+ export { unset };
7
+ export { one };
8
+ export { union };
9
+ export { setRange };
10
+ export { range };
11
+ export { complement };
12
+ export { toRangeMap };
13
+ }
14
+ export default _default;
15
+ export type ByteSet = bigint;
16
+ export type Byte = number;
17
+ declare const empty: 0n;
18
+ declare const universe: 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn;
19
+ /** @typedef {bigint} ByteSet */
20
+ /** @typedef {number} Byte */
21
+ /** @type {(n: Byte) => (s: ByteSet) => boolean} */
22
+ declare const has: (n: Byte) => (s: ByteSet) => boolean;
23
+ declare const set: import("../function/module.f.mjs").Func<number, (b: ByteSet) => ByteSet>;
24
+ /** @type {(n: Byte) => (s: ByteSet) => ByteSet} */
25
+ declare const unset: (n: Byte) => (s: ByteSet) => ByteSet;
26
+ /** @type {(n: Byte) => ByteSet} */
27
+ declare const one: (n: Byte) => ByteSet;
28
+ /** @type {(a: ByteSet) => (b: ByteSet) => ByteSet} */
29
+ declare const union: (a: ByteSet) => (b: ByteSet) => ByteSet;
30
+ declare const setRange: import("../function/module.f.mjs").Func<readonly [number, number], (b: ByteSet) => ByteSet>;
31
+ /** @type {(r: readonly[Byte, Byte]) => ByteSet} */
32
+ declare const range: (r: readonly [Byte, Byte]) => ByteSet;
33
+ /** @type {(n: ByteSet) => ByteSet} */
34
+ declare const complement: (n: ByteSet) => ByteSet;
35
+ /** @type {(n: ByteSet) => (s: string) => RangeMap.RangeMap<SortedSet.SortedSet<string>>} */
36
+ declare const toRangeMap: (n: ByteSet) => (s: string) => RangeMap.RangeMap<SortedSet.SortedSet<string>>;
37
+ import * as RangeMap from '../range_map/module.f.mjs';
38
+ import * as SortedSet from '../sorted_set/module.f.mjs';
@@ -1,7 +1,7 @@
1
1
  import f from '../function/module.f.mjs'
2
- const { fn, compose } = f
2
+ const { compose } = f
3
3
  import * as RangeMap from '../range_map/module.f.mjs'
4
- import sortedSet, * as SortedSet from '../sorted_set/module.f.mjs'
4
+ import * as SortedSet from '../sorted_set/module.f.mjs'
5
5
  import list from '../list/module.f.mjs'
6
6
  const { reverse, countdown, flat, map } = list
7
7
 
@@ -0,0 +1,13 @@
1
+ declare namespace _default {
2
+ let has: (() => void)[];
3
+ function setRange(): void;
4
+ let unset: (() => void)[];
5
+ function universe(): void;
6
+ namespace compliment {
7
+ export function empty(): void;
8
+ export function universe_1(): void;
9
+ export { universe_1 as universe };
10
+ }
11
+ let toRangeMap: (() => void)[];
12
+ }
13
+ export default _default;
@@ -1,12 +1,12 @@
1
1
  import _ from './module.f.mjs'
2
2
  import list from '../list/module.f.mjs'
3
3
  const { every, countdown, map, toArray } = list
4
- import json, * as jsonT from '../../json/module.f.mjs'
4
+ import json, * as Json from '../../json/module.f.mjs'
5
5
  import o from '../object/module.f.mjs'
6
6
  const { sort } = o
7
7
 
8
- /** @type {(a: readonly jsonT.Unknown[]) => string} */
9
- const stringify = a => json.stringify(sort)(a)
8
+ /** @type {(a: readonly Json.Unknown[]) => string} */
9
+ const stringify = json.stringify(sort)
10
10
 
11
11
  export default {
12
12
  has: [
@@ -0,0 +1,29 @@
1
+ declare namespace _default {
2
+ export { unsafeCmp };
3
+ export { index3 };
4
+ export { index5 };
5
+ }
6
+ export default _default;
7
+ export type Index3 = Array.Index3;
8
+ export type Index5 = Array.Index5;
9
+ export type Array2<T> = Array.Array2<T>;
10
+ export type Sign = -1 | 0 | 1;
11
+ export type Compare<T> = (_: T) => Sign;
12
+ /** @type {<T>(a: T) => (b: T) => Sign} */
13
+ declare const unsafeCmp: <T>(a: T) => (b: T) => Sign;
14
+ /** @typedef {Array.Index3} Index3 */
15
+ /** @typedef {Array.Index5} Index5 */
16
+ /**
17
+ * @template T
18
+ * @typedef {Array.Array2<T>} Array2
19
+ */
20
+ /** @typedef {-1|0|1} Sign */
21
+ /**
22
+ * @template T
23
+ * @typedef {(_: T) => Sign} Compare
24
+ */
25
+ /** @type {<T>(cmp: Compare<T>) => (value: T) => Index3} */
26
+ declare const index3: <T>(cmp: Compare<T>) => (value: T) => Index3;
27
+ /** @type {<T>(cmp: Compare<T>) => (v2: Array2<T>) => Index5} */
28
+ declare const index5: <T>(cmp: Compare<T>) => (v2: Array2<T>) => Index5;
29
+ import * as Array from '../../array/module.f.mjs';
@@ -1,11 +1,11 @@
1
- import * as array from '../../array/module.f.mjs'
1
+ import * as Array from '../../array/module.f.mjs'
2
2
 
3
- /** @typedef {array.Index3} Index3 */
4
- /** @typedef {array.Index5} Index5 */
3
+ /** @typedef {Array.Index3} Index3 */
4
+ /** @typedef {Array.Index5} Index5 */
5
5
 
6
6
  /**
7
7
  * @template T
8
- * @typedef {array.Array2<T>} Array2
8
+ * @typedef {Array.Array2<T>} Array2
9
9
  */
10
10
 
11
11
  /** @typedef {-1|0|1} Sign */
@@ -0,0 +1,2 @@
1
+ declare function _default(): void;
2
+ export default _default;
@@ -0,0 +1,36 @@
1
+ declare namespace _default {
2
+ export { identity };
3
+ export { compose };
4
+ export { flip };
5
+ export { fn };
6
+ }
7
+ export default _default;
8
+ export type Func<I, O> = (_: I) => O;
9
+ export type Fn<I, O> = {
10
+ readonly result: Func<I, O>;
11
+ readonly then: <T>(g: Func<O, T>) => Fn<I, T>;
12
+ };
13
+ /** @type {<T>(value: T) => T} */
14
+ declare const identity: <T>(value: T) => T;
15
+ /**
16
+ * @template I
17
+ * @template O
18
+ * @typedef {(_: I) => O} Func
19
+ */
20
+ /**
21
+ * A postfix compose function.
22
+ *
23
+ * @type {<I, X>(g: Func<I, X>) => <O>(f: Func<X, O>) => Func<I, O>}
24
+ */
25
+ declare const compose: <I, X>(g: Func<I, X>) => <O>(f: Func<X, O>) => Func<I, O>;
26
+ /** @type {<A, B, C>(f: (a: A) => (b: B) => C) => (b: B) => (a: A) => C} */
27
+ declare const flip: <A, B, C>(f: (a: A) => (b: B) => C) => (b: B) => (a: A) => C;
28
+ /**
29
+ * @template I,O
30
+ * @typedef {{
31
+ * readonly result: Func<I, O>
32
+ * readonly then: <T>(g: Func<O, T>) => Fn<I, T>
33
+ * }} Fn
34
+ */
35
+ /** @type {<I, O>(f: (i: I) => O) => Fn<I, O>} */
36
+ declare const fn: <I, O>(f: (i: I) => O) => Fn<I, O>;
@@ -0,0 +1,75 @@
1
+ declare namespace _default {
2
+ export { join };
3
+ export { addition };
4
+ export { increment };
5
+ export { strictEqual };
6
+ export { logicalNot };
7
+ export { min };
8
+ export { max };
9
+ export { stateScanToScan };
10
+ export { foldToScan };
11
+ export { reduceToScan };
12
+ export { counter };
13
+ export { concat };
14
+ }
15
+ export default _default;
16
+ export type Binary<A, B, R> = (a: A) => (b: B) => R;
17
+ export type Fold<I, O> = Binary<I, O, O>;
18
+ export type Unary<T, R> = (value: T) => R;
19
+ export type Equal<T> = Binary<T, T, boolean>;
20
+ export type Scan<I, O> = (input: I) => readonly [O, Scan<I, O>];
21
+ export type StateScan<I, S, O> = (prior: S) => (input: I) => readonly [O, S];
22
+ export type Reduce<T> = Fold<T, T>;
23
+ /**
24
+ * @template A
25
+ * @template B
26
+ * @template R
27
+ * @typedef {(a: A) => (b: B) => R} Binary
28
+ */
29
+ /**
30
+ * @template I,O
31
+ * @typedef {Binary<I, O, O>} Fold
32
+ */
33
+ /** @type {(separator: string) => Reduce<string>} */
34
+ declare const join: (separator: string) => Reduce<string>;
35
+ /** @type {Reduce<number>} */
36
+ declare const addition: Reduce<number>;
37
+ declare const increment: (b: number) => number;
38
+ /**
39
+ * @template T
40
+ * @typedef {Binary<T, T, boolean>} Equal
41
+ */
42
+ /** @type {<T>(a: T) => (b: T) => boolean} */
43
+ declare const strictEqual: <T>(a: T) => (b: T) => boolean;
44
+ /**
45
+ * @template T
46
+ * @template R
47
+ * @typedef {(value: T) => R} Unary
48
+ */
49
+ /** @type {Unary<boolean, boolean>} */
50
+ declare const logicalNot: Unary<boolean, boolean>;
51
+ /** @type {Reduce<number>} */
52
+ declare const min: Reduce<number>;
53
+ /** @type {Reduce<number>} */
54
+ declare const max: Reduce<number>;
55
+ /**
56
+ * @template I,O
57
+ * @typedef {(input: I) => readonly[O, Scan<I,O>]} Scan
58
+ */
59
+ /**
60
+ * @template I,S,O
61
+ * @typedef {(prior: S) => (input: I) => readonly[O, S]} StateScan
62
+ */
63
+ /** @type {<I, S, O>(op: StateScan<I, S, O>) => (prior: S) => Scan<I, O>} */
64
+ declare const stateScanToScan: <I, S, O>(op: StateScan<I, S, O>) => (prior: S) => Scan<I, O>;
65
+ /** @type {<I, O>(fold: Fold<I, O>) => (prior: O) => Scan<I, O>} */
66
+ declare const foldToScan: <I, O>(fold: Fold<I, O>) => (prior: O) => Scan<I, O>;
67
+ /**
68
+ * @template T
69
+ * @typedef {Fold<T, T>} Reduce
70
+ */
71
+ /** @type {<T>(fold: Reduce<T>) => Scan<T, T>} */
72
+ declare const reduceToScan: <T>(fold: Reduce<T>) => Scan<T, T>;
73
+ declare function counter(): (b: number) => number;
74
+ /** @type {Reduce<string>} */
75
+ declare const concat: Reduce<string>;
@@ -0,0 +1,2 @@
1
+ declare function _default(): void;
2
+ export default _default;
@@ -0,0 +1,117 @@
1
+ declare namespace _default {
2
+ export let empty: null;
3
+ export { concat };
4
+ export { next };
5
+ export { iterable };
6
+ export { toArray };
7
+ export { flat };
8
+ export { map };
9
+ export { flatMap };
10
+ export { filter };
11
+ export { filterMap };
12
+ export { takeWhile };
13
+ export { take };
14
+ export { dropWhile };
15
+ export { drop };
16
+ export { first };
17
+ export { last };
18
+ export { find };
19
+ export { some };
20
+ export { every };
21
+ export { isEmpty };
22
+ export { includes };
23
+ export { countdown };
24
+ export { repeat };
25
+ export { cycle };
26
+ export { scan };
27
+ export { stateScan };
28
+ export { foldScan };
29
+ export { fold };
30
+ export { reduce };
31
+ export { length };
32
+ export { entries };
33
+ export { reverse };
34
+ export { zip };
35
+ export { equal };
36
+ }
37
+ export default _default;
38
+ export type List<T> = NotLazy<T> | Thunk<T>;
39
+ export type NotLazy<T> = Result<T> | Concat<T> | readonly T[];
40
+ export type Empty = null;
41
+ export type Result<T> = Empty | NonEmpty<T>;
42
+ export type Thunk<T> = () => List<T>;
43
+ export type NonEmpty<T> = {
44
+ readonly first: T;
45
+ readonly tail: List<T>;
46
+ };
47
+ export type Concat<T> = {
48
+ readonly head: List<T>;
49
+ readonly tail: List<T>;
50
+ };
51
+ export type Entry<T> = readonly [number, T];
52
+ /** @type {<T>(head: List<T>) => (tail: List<T>) => List<T>} */
53
+ declare const concat: <T>(head: List<T>) => (tail: List<T>) => List<T>;
54
+ /** @type {<T>(list: List<T>) => Result<T>} */
55
+ declare const next: <T>(list: List<T>) => Result<T>;
56
+ /** @type {<T>(list: List<T>) => Iterable<T>} */
57
+ declare const iterable: <T>(list: List<T>) => Iterable<T>;
58
+ /** @type {<T>(list: List<T>) => readonly T[]} */
59
+ declare const toArray: <T>(list: List<T>) => readonly T[];
60
+ /** @type {<T>(list: List<List<T>>) => Thunk<T>} */
61
+ declare const flat: <T>(list: List<List<T>>) => Thunk<T>;
62
+ /** @type {<I, O>(f: (value: I) => O) => (input: List<I>) => Thunk<O>} */
63
+ declare const map: <I, O>(f: (value: I) => O) => (input: List<I>) => Thunk<O>;
64
+ /** @type {<I, O>(f: (value: I) => List<O>) => (input: List<I>) => Thunk<O>} */
65
+ declare const flatMap: <I, O>(f: (value: I) => List<O>) => (input: List<I>) => Thunk<O>;
66
+ /** @type {<T>(f: (value: T) => boolean) => (input: List<T>) => Thunk<T>} */
67
+ declare const filter: <T>(f: (value: T) => boolean) => (input: List<T>) => Thunk<T>;
68
+ /** @type {<I, O>(f: (value: I) => O|null) => (input: List<I>) => Thunk<O>} */
69
+ declare const filterMap: <I, O>(f: (value: I) => O | null) => (input: List<I>) => Thunk<O>;
70
+ /** @type {<T>(f: (value: T) => boolean) => (input: List<T>) => Thunk<T>} */
71
+ declare const takeWhile: <T>(f: (value: T) => boolean) => (input: List<T>) => Thunk<T>;
72
+ /** @type {(n: number) => <T>(input: List<T>) => Thunk<T>} */
73
+ declare const take: (n: number) => <T>(input: List<T>) => Thunk<T>;
74
+ /** @type {<T>(f: (value: T) => boolean) => (input: List<T>) => Thunk<T>} */
75
+ declare const dropWhile: <T>(f: (value: T) => boolean) => (input: List<T>) => Thunk<T>;
76
+ /** @type {(n: number) => <T>(input: List<T>) => Thunk<T>} */
77
+ declare const drop: (n: number) => <T>(input: List<T>) => Thunk<T>;
78
+ /** @type {<D>(def: D) => <T>(input: List<T>) => D|T} */
79
+ declare const first: <D>(def: D) => <T>(input: List<T>) => D | T;
80
+ /** @type {<D>(first: D) => <T>(tail: List<T>) => D|T} */
81
+ declare const last: <D>(first: D) => <T>(tail: List<T>) => D | T;
82
+ /** @type {<D>(def: D) => <T>(f: (value: T) => boolean) => (input: List<T>) => D|T} */
83
+ declare const find: <D>(def: D) => <T>(f: (value: T) => boolean) => (input: List<T>) => D | T;
84
+ /** @type {(input: List<boolean>) => boolean} */
85
+ declare const some: (input: List<boolean>) => boolean;
86
+ declare const every: import("../function/module.f.mjs").Func<List<boolean>, boolean>;
87
+ /** @type {<T>(input: List<T>) => boolean} */
88
+ declare const isEmpty: <T>(input: List<T>) => boolean;
89
+ /** @type {<T>(value: T) => (sequence: List<T>) => boolean} */
90
+ declare const includes: <T>(value: T) => (sequence: List<T>) => boolean;
91
+ /** @type {(count: number) => Thunk<number>} */
92
+ declare const countdown: (count: number) => Thunk<number>;
93
+ /** @type {<T>(v: T) => (c: number) => Thunk<T>} */
94
+ declare const repeat: <T>(v: T) => (c: number) => Thunk<T>;
95
+ /** @type {<T>(list: List<T>) => List<T>} */
96
+ declare const cycle: <T>(list: List<T>) => List<T>;
97
+ /** @type {<I, O>(op: Operator.Scan<I, O>) => (input: List<I>) => Thunk<O>} */
98
+ declare const scan: <I, O>(op: Operator.Scan<I, O>) => (input: List<I>) => Thunk<O>;
99
+ /** @type {<I, S, O>(op: Operator.StateScan<I, S, O>) => (init: S) => (input: List<I>) => Thunk<O>} */
100
+ declare const stateScan: <I, S, O>(op: Operator.StateScan<I, S, O>) => (init: S) => (input: List<I>) => Thunk<O>;
101
+ /** @type {<I,O>(op: Operator.Fold<I, O>) => (init: O) => (input: List<I>) => Thunk<O>} */
102
+ declare const foldScan: <I, O>(op: Operator.Fold<I, O>) => (init: O) => (input: List<I>) => Thunk<O>;
103
+ /** @type {<I,O>(op: Operator.Fold<I, O>) => (init: O) => (input: List<I>) => O} */
104
+ declare const fold: <I, O>(op: Operator.Fold<I, O>) => (init: O) => (input: List<I>) => O;
105
+ /** @type {<T>(op: Operator.Reduce<T>) => <D>(def: D) => (input: List<T>) => D|T} */
106
+ declare const reduce: <T>(op: Operator.Reduce<T>) => <D>(def: D) => (input: List<T>) => D | T;
107
+ /** @type {<T>(input: List<T>) => number} */
108
+ declare const length: <T>(input: List<T>) => number;
109
+ /** @type {<T>(input: List<T>) => Thunk<Entry<T>>} */
110
+ declare const entries: <T>(input: List<T>) => Thunk<Entry<T>>;
111
+ /** @type {<T>(input: List<T>) => List<T>} */
112
+ declare const reverse: <T>(input: List<T>) => List<T>;
113
+ /** @type {<A>(a: List<A>) => <B>(b: List<B>) => Thunk<readonly[A, B]>} */
114
+ declare const zip: <A>(a: List<A>) => <B>(b: List<B>) => Thunk<readonly [A, B]>;
115
+ /** @type {<T>(e: Operator.Equal<T>) => (a: List<T>) => (b: List<T>) => boolean} */
116
+ declare const equal: <T>(e: Operator.Equal<T>) => (a: List<T>) => (b: List<T>) => boolean;
117
+ import * as Operator from '../function/operator/module.f.mjs';
@@ -0,0 +1,38 @@
1
+ declare namespace _default {
2
+ export { stringifyTest };
3
+ export { cycle };
4
+ export { countdown };
5
+ export { flat };
6
+ export { concat };
7
+ export { flatMap };
8
+ export { take };
9
+ export { find };
10
+ export { takeWhile };
11
+ export { dropWhile };
12
+ export { drop };
13
+ export { additionTests };
14
+ export { entries };
15
+ export { reverse };
16
+ export { zip };
17
+ export { logic };
18
+ export let strictEqual: (() => void)[];
19
+ export let isEmpty: (() => void)[];
20
+ export function length(): void;
21
+ }
22
+ export default _default;
23
+ declare function stringifyTest(): void;
24
+ declare function cycle(): void;
25
+ declare function countdown(): void;
26
+ declare function flat(): void;
27
+ declare function concat(): void;
28
+ declare function flatMap(): void;
29
+ declare const take: (() => void)[];
30
+ declare const find: (() => void)[];
31
+ declare const takeWhile: (() => void)[];
32
+ declare function dropWhile(): void;
33
+ declare const drop: (() => void)[];
34
+ declare const additionTests: (() => void)[];
35
+ declare const entries: (() => void)[];
36
+ declare const reverse: (() => void)[];
37
+ declare const zip: (() => void)[];
38
+ declare function logic(): (() => void)[];
@@ -0,0 +1,30 @@
1
+ declare namespace _default {
2
+ export let empty: null;
3
+ export { at };
4
+ export { setReduce };
5
+ export { setReplace };
6
+ export { entries };
7
+ export { fromEntries };
8
+ export { remove };
9
+ }
10
+ export default _default;
11
+ export type Sign = Compare.Sign;
12
+ export type Cmp<T> = Compare.Compare<T>;
13
+ export type Entry<T> = readonly [string, T];
14
+ export type Map<T> = BtreeTypes.Tree<Entry<T>>;
15
+ /** @type {(name: string) => <T>(map: Map<T>) => T|null} */
16
+ declare const at: (name: string) => <T>(map: Map<T>) => T | null;
17
+ /** @type {<T>(reduce: Operator.Reduce<T>) => (name: string) => (value: T) => (map: Map<T>) => Map<T>} */
18
+ declare const setReduce: <T>(reduce: Operator.Reduce<T>) => (name: string) => (value: T) => (map: Map<T>) => Map<T>;
19
+ /** @type {(name: string) => <T>(value: T) => (map: Map<T>) => Map<T>} */
20
+ declare const setReplace: (name: string) => <T>(value: T) => (map: Map<T>) => Map<T>;
21
+ /** @type {<T>(map: Map<T>) => List.List<Entry<T>>} */
22
+ declare const entries: <T>(map: Map<T>) => List.List<Entry<T>>;
23
+ /** @type {<T>(entries: List.List<Entry<T>>) => Map<T>} */
24
+ declare const fromEntries: <T>(entries: List.List<Entry<T>>) => Map<T>;
25
+ /** @type {(name: string) => <T>(map: Map<T>) => Map<T>} */
26
+ declare const remove: (name: string) => <T>(map: Map<T>) => Map<T>;
27
+ import * as Compare from '../function/compare/module.f.mjs';
28
+ import * as BtreeTypes from '../btree/types/module.f.mjs';
29
+ import * as Operator from '../function/operator/module.f.mjs';
30
+ import * as List from '../list/module.f.mjs';
@@ -1,4 +1,4 @@
1
- import * as btreeTypes from '../btree/types/module.f.mjs'
1
+ import * as BtreeTypes from '../btree/types/module.f.mjs'
2
2
  import btf from '../btree/find/module.f.mjs'
3
3
  const { value, find } = btf
4
4
  import bts from '../btree/set/module.f.mjs'
@@ -7,12 +7,12 @@ import btr from '../btree/remove/module.f.mjs'
7
7
  const { remove: btreeRemove } = btr
8
8
  import bt from '../btree/module.f.mjs'
9
9
  const { values } = bt
10
- import compare, * as Compare from '../function/compare/module.f.mjs'
10
+ import * as Compare from '../function/compare/module.f.mjs'
11
11
  import s from '../string/module.f.mjs'
12
12
  const { cmp } = s
13
13
  import list, * as List from '../list/module.f.mjs'
14
14
  const { fold } = list
15
- import operator, * as Operator from '../function/operator/module.f.mjs'
15
+ import * as Operator from '../function/operator/module.f.mjs'
16
16
 
17
17
  /** @typedef {Compare.Sign} Sign */
18
18
 
@@ -28,7 +28,7 @@ import operator, * as Operator from '../function/operator/module.f.mjs'
28
28
 
29
29
  /**
30
30
  * @template T
31
- * @typedef {btreeTypes.Tree<Entry<T>>} Map
31
+ * @typedef {BtreeTypes.Tree<Entry<T>>} Map
32
32
  */
33
33
 
34
34
  /** @type {(a: string) => <T>(b: Entry<T>) => Sign} */
@@ -0,0 +1,5 @@
1
+ declare namespace _default {
2
+ let main: (() => void)[];
3
+ function stress(): void;
4
+ }
5
+ export default _default;
@@ -0,0 +1,26 @@
1
+ declare namespace _default {
2
+ export { empty };
3
+ export { universe };
4
+ export { has };
5
+ export { complement };
6
+ export { set };
7
+ export { unset };
8
+ export { setRange };
9
+ }
10
+ export default _default;
11
+ export type NibbleSet = number;
12
+ export type Nibble = number;
13
+ /** @typedef {number} NibbleSet */
14
+ /** @typedef {number} Nibble */
15
+ declare const empty: 0;
16
+ declare const universe: 65535;
17
+ /** @type {(n: Nibble) => (s: NibbleSet) => boolean} */
18
+ declare const has: (n: Nibble) => (s: NibbleSet) => boolean;
19
+ /** @type {(n: NibbleSet) => NibbleSet} */
20
+ declare const complement: (n: NibbleSet) => NibbleSet;
21
+ /** @type {(n: Nibble) => (s: NibbleSet) => NibbleSet} */
22
+ declare const set: (n: Nibble) => (s: NibbleSet) => NibbleSet;
23
+ /** @type {(n: Nibble) => (s: NibbleSet) => NibbleSet} */
24
+ declare const unset: (n: Nibble) => (s: NibbleSet) => NibbleSet;
25
+ /** @type {(r: readonly[number, number]) => (s: NibbleSet) => NibbleSet} */
26
+ declare const setRange: (r: readonly [number, number]) => (s: NibbleSet) => NibbleSet;
@@ -0,0 +1,13 @@
1
+ declare namespace _default {
2
+ function has(): void;
3
+ let set: (() => void)[];
4
+ function unset(): (() => void)[];
5
+ function setRange(): void;
6
+ function universe(): void;
7
+ namespace compliment {
8
+ export function empty(): void;
9
+ export function universe_1(): void;
10
+ export { universe_1 as universe };
11
+ }
12
+ }
13
+ export default _default;
@@ -0,0 +1,14 @@
1
+ declare namespace _default {
2
+ export { map };
3
+ export { match };
4
+ }
5
+ export default _default;
6
+ export type Nullable<T> = T | null;
7
+ /**
8
+ * @template T
9
+ * @typedef {T|null} Nullable
10
+ */
11
+ /** @type {<T, R>(f: (value: T) => R) => (value: Nullable<T>) => Nullable<R>} */
12
+ declare const map: <T, R>(f: (value: T) => R) => (value: Nullable<T>) => Nullable<R>;
13
+ /** @type {<T, R>(f: (_: T) => R) => (none: () => R) => (_: Nullable<T>) => Nullable<R>} */
14
+ declare const match: <T, R>(f: (_: T) => R) => (none: () => R) => (_: Nullable<T>) => Nullable<R>;
@@ -0,0 +1,2 @@
1
+ declare function _default(): void;
2
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare namespace _default {
2
+ export { sum };
3
+ export { min };
4
+ export { max };
5
+ export { cmp };
6
+ }
7
+ export default _default;
8
+ declare const sum: (input: import("../list/module.f.mjs").List<number>) => number;
9
+ declare const min: (input: import("../list/module.f.mjs").List<number>) => number | null;
10
+ declare const max: (input: import("../list/module.f.mjs").List<number>) => number | null;
11
+ /** @type {(a: number) => (b: number) => Compare.Sign} */
12
+ declare const cmp: (a: number) => (b: number) => Compare.Sign;
13
+ import * as Compare from '../function/compare/module.f.mjs';
@@ -0,0 +1,11 @@
1
+ declare namespace _default {
2
+ function sum(): void;
3
+ namespace min {
4
+ function empty(): void;
5
+ function multi(): void;
6
+ }
7
+ function max(): void;
8
+ function cmp(): void;
9
+ function standard(): void;
10
+ }
11
+ export default _default;
@@ -0,0 +1,29 @@
1
+ declare namespace _default {
2
+ export { at };
3
+ export { sort };
4
+ export { fromEntries };
5
+ export { fromMap };
6
+ }
7
+ export default _default;
8
+ export type Map<T> = { readonly [k in string]: T; };
9
+ export type Entry<T> = readonly [string, T];
10
+ /**
11
+ * @template T
12
+ * @typedef {{
13
+ * readonly [k in string]: T
14
+ * }} Map
15
+ */
16
+ /**
17
+ * @template T
18
+ * @typedef {readonly[string, T]} Entry
19
+ */
20
+ /** @type {(name: string) => <T>(object: Map<T>) => T|null} */
21
+ declare const at: (name: string) => <T>(object: Map<T>) => T | null;
22
+ /** @type {<T>(e: List.List<Entry<T>>) => List.List<Entry<T>>} */
23
+ declare const sort: <T>(e: List.List<Entry<T>>) => List.List<Entry<T>>;
24
+ /** @type {<T>(e: List.List<Entry<T>>) => Map<T>} */
25
+ declare const fromEntries: <T>(e: List.List<Entry<T>>) => Map<T>;
26
+ /** @type {<T>(m: Map.Map<T>) => Map<T>} */
27
+ declare const fromMap: <T>(m: Map.Map<T>) => Map<T>;
28
+ import * as List from '../list/module.f.mjs';
29
+ import * as Map from '../map/module.f.mjs';
@@ -0,0 +1,5 @@
1
+ declare namespace _default {
2
+ function ctor(): void;
3
+ function property(): void;
4
+ }
5
+ export default _default;
@@ -0,0 +1,11 @@
1
+ declare namespace _default {
2
+ export { contains };
3
+ export { one };
4
+ }
5
+ export default _default;
6
+ export type Range = readonly [number, number];
7
+ /** @typedef {readonly[number,number]} Range */
8
+ /** @type {(range: Range) => (i: number) => boolean} */
9
+ declare const contains: (range: Range) => (i: number) => boolean;
10
+ /** @type {(i: number) => Range} */
11
+ declare const one: (i: number) => Range;
@@ -0,0 +1,2 @@
1
+ declare function _default(): void;
2
+ export default _default;
@@ -0,0 +1,25 @@
1
+ declare namespace _default {
2
+ export { merge };
3
+ export { get };
4
+ export { fromRange };
5
+ }
6
+ export default _default;
7
+ export type Entry<T> = [T, number];
8
+ export type RangeMap<T> = SortedList.SortedList<Entry<T>>;
9
+ export type RangeMapArray<T> = readonly Entry<T>[];
10
+ export type Operators<T> = {
11
+ readonly union: O.Reduce<T>;
12
+ readonly equal: O.Equal<T>;
13
+ };
14
+ export type RangeState<T> = Option.Nullable<Entry<T>>;
15
+ export type RangeMerge<T> = O.Reduce<RangeMap<T>>;
16
+ /** @type {<T>(op: Operators<T>) => RangeMerge<T>} */
17
+ declare const merge: <T>(op: Operators<T>) => RangeMerge<T>;
18
+ /** @type {<T>(def: T) => (value: number) => (rm: RangeMapArray<T>) => T} */
19
+ declare const get: <T>(def: T) => (value: number) => (rm: RangeMapArray<T>) => T;
20
+ /** @type {<T>(def: T) => (r: Range.Range) => (value: T) => RangeMapArray<T>} */
21
+ declare const fromRange: <T>(def: T) => (r: Range.Range) => (value: T) => RangeMapArray<T>;
22
+ import * as SortedList from '../sorted_list/module.f.mjs';
23
+ import * as O from '../function/operator/module.f.mjs';
24
+ import * as Option from '../nullable/module.f.mjs';
25
+ import * as Range from '../range/module.f.mjs';