functionalscript 0.3.7 → 0.3.8

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 (109) hide show
  1. package/com/cpp/module.f.js +0 -1
  2. package/com/cs/module.f.js +5 -6
  3. package/com/rust/module.f.d.ts +3 -3
  4. package/com/rust/module.f.js +24 -29
  5. package/com/test/build.f.js +2 -2
  6. package/com/types/module.f.d.ts +1 -1
  7. package/com/types/module.f.js +1 -2
  8. package/com/types/testlib.f.js +0 -1
  9. package/commonjs/build/module.f.d.ts +2 -2
  10. package/commonjs/build/module.f.js +3 -6
  11. package/commonjs/build/test.f.js +0 -4
  12. package/commonjs/module/function/module.f.d.ts +1 -1
  13. package/commonjs/module/function/module.f.js +1 -1
  14. package/commonjs/module/module.f.d.ts +1 -1
  15. package/commonjs/module/module.f.js +2 -3
  16. package/commonjs/path/module.f.d.ts +5 -5
  17. package/commonjs/path/module.f.js +6 -8
  18. package/commonjs/path/test.f.js +1 -2
  19. package/crypto/prime_field/module.f.d.ts +1 -1
  20. package/crypto/prime_field/module.f.js +1 -1
  21. package/crypto/secp/module.f.d.ts +1 -1
  22. package/crypto/secp/module.f.js +2 -2
  23. package/crypto/sha2/module.f.d.ts +75 -12
  24. package/crypto/sha2/module.f.js +246 -139
  25. package/crypto/sha2/test.f.d.ts +22 -3
  26. package/crypto/sha2/test.f.js +120 -67
  27. package/dev/test/module.f.d.ts +1 -1
  28. package/dev/test/module.f.js +4 -5
  29. package/dev/test.f.js +0 -4
  30. package/djs/module.f.d.ts +1 -1
  31. package/djs/module.f.js +0 -1
  32. package/djs/parser/module.f.d.ts +1 -1
  33. package/djs/parser/module.f.js +0 -2
  34. package/djs/serializer/module.f.d.ts +2 -2
  35. package/djs/serializer/module.f.js +0 -2
  36. package/djs/tokenizer/module.f.js +0 -1
  37. package/fsc/test.f.js +0 -1
  38. package/js/tokenizer/module.f.d.ts +1 -1
  39. package/js/tokenizer/module.f.js +1 -1
  40. package/json/parser/module.f.d.ts +2 -2
  41. package/json/parser/module.f.js +0 -3
  42. package/json/serializer/module.f.js +0 -2
  43. package/json/tokenizer/module.f.js +0 -1
  44. package/package.json +1 -1
  45. package/text/ascii/module.f.d.ts +1 -1
  46. package/text/ascii/module.f.js +2 -3
  47. package/text/ascii/test.f.js +2 -4
  48. package/text/module.f.d.ts +18 -3
  49. package/text/module.f.js +22 -6
  50. package/text/sgr/module.f.js +1 -1
  51. package/text/test.f.d.ts +4 -1
  52. package/text/test.f.js +24 -16
  53. package/text/utf16/module.f.d.ts +5 -6
  54. package/text/utf16/module.f.js +9 -10
  55. package/text/utf16/test.f.js +29 -30
  56. package/text/utf8/module.f.d.ts +8 -5
  57. package/text/utf8/module.f.js +3 -5
  58. package/text/utf8/test.f.js +34 -35
  59. package/types/bigfloat/module.f.js +1 -1
  60. package/types/bigint/module.f.d.ts +17 -5
  61. package/types/bigint/module.f.js +19 -4
  62. package/types/bigint/test.f.d.ts +1 -0
  63. package/types/bigint/test.f.js +7 -2
  64. package/types/bit_vec/module.f.d.ts +103 -83
  65. package/types/bit_vec/module.f.js +68 -110
  66. package/types/bit_vec/test.f.d.ts +20 -8
  67. package/types/bit_vec/test.f.js +110 -117
  68. package/types/btree/find/test.f.js +3 -4
  69. package/types/btree/module.f.d.ts +3 -3
  70. package/types/btree/module.f.js +2 -5
  71. package/types/btree/remove/test.f.js +2 -3
  72. package/types/btree/set/test.f.js +3 -6
  73. package/types/btree/test.f.js +0 -1
  74. package/types/btree/types/module.f.d.ts +3 -3
  75. package/types/byte_set/module.f.d.ts +2 -2
  76. package/types/byte_set/module.f.js +0 -2
  77. package/types/function/compare/module.f.d.ts +1 -1
  78. package/types/function/compare/module.f.js +0 -1
  79. package/types/function/compare/test.f.js +1 -2
  80. package/types/function/module.f.d.ts +1 -1
  81. package/types/function/module.f.js +1 -1
  82. package/types/function/operator/module.f.d.ts +2 -3
  83. package/types/function/operator/module.f.js +5 -5
  84. package/types/function/test.f.js +1 -2
  85. package/types/list/module.f.d.ts +1 -1
  86. package/types/list/module.f.js +9 -9
  87. package/types/list/test.f.js +2 -4
  88. package/types/map/module.f.d.ts +6 -6
  89. package/types/map/module.f.js +6 -15
  90. package/types/map/test.f.js +1 -2
  91. package/types/nibble_set/module.f.d.ts +2 -3
  92. package/types/nibble_set/test.f.js +1 -2
  93. package/types/number/test.f.js +1 -2
  94. package/types/object/module.f.d.ts +5 -5
  95. package/types/object/module.f.js +2 -4
  96. package/types/range_map/module.f.d.ts +4 -4
  97. package/types/range_map/module.f.js +3 -9
  98. package/types/result/module.f.d.ts +2 -3
  99. package/types/sorted_list/module.f.d.ts +6 -6
  100. package/types/sorted_list/module.f.js +2 -6
  101. package/types/sorted_list/test.f.js +4 -9
  102. package/types/sorted_set/module.f.d.ts +1 -1
  103. package/types/sorted_set/module.f.js +2 -5
  104. package/types/sorted_set/test.f.js +4 -9
  105. package/types/string/module.f.d.ts +3 -3
  106. package/types/string/module.f.js +1 -2
  107. package/types/string/test.f.js +2 -4
  108. package/types/string_set/module.f.d.ts +1 -1
  109. package/types/string_set/module.f.js +5 -11
@@ -13,7 +13,7 @@ export const flip = f => b => a => f(a)(b);
13
13
  /**
14
14
  * Creates an `Fn` instance from a function, enabling chaining of transformations.
15
15
  */
16
- export const fn = result => ({
16
+ export const fn = (result) => ({
17
17
  result,
18
18
  then: g => fn(compose(result)(g))
19
19
  });
@@ -1,4 +1,4 @@
1
- type Binary<A, B, R> = (a: A) => (b: B) => R;
1
+ export type Binary<A, B, R> = (a: A) => (b: B) => R;
2
2
  export type Fold<I, O> = Binary<I, O, O>;
3
3
  export declare const join: (separator: string) => Reduce<string>;
4
4
  export declare const concat: Reduce<string>;
@@ -11,10 +11,9 @@ export type StateScan<I, S, O> = (prior: S) => (input: I) => readonly [O, S];
11
11
  export declare const stateScanToScan: <I, S, O>(op: StateScan<I, S, O>) => (prior: S) => Scan<I, O>;
12
12
  export declare const foldToScan: <I, O>(fold: Fold<I, O>) => (prior: O) => Scan<I, O>;
13
13
  export type Reduce<T> = Fold<T, T>;
14
- export declare const reduceToScan: <T>(fold: Reduce<T>) => Scan<T, T>;
14
+ export declare const reduceToScan: <T>(op: Reduce<T>) => Scan<T, T>;
15
15
  export declare const addition: Reduce<number>;
16
16
  export declare const min: Reduce<number>;
17
17
  export declare const max: Reduce<number>;
18
18
  export declare const increment: (b: number) => number;
19
19
  export declare const counter: () => (b: number) => number;
20
- export {};
@@ -1,16 +1,16 @@
1
- export const join = separator => value => prior => `${prior}${separator}${value}`;
1
+ export const join = (separator) => value => prior => `${prior}${separator}${value}`;
2
2
  export const concat = i => acc => `${acc}${i}`;
3
3
  export const logicalNot = v => !v;
4
- export const strictEqual = a => b => a === b;
5
- export const stateScanToScan = op => prior => i => {
4
+ export const strictEqual = (a) => (b) => a === b;
5
+ export const stateScanToScan = (op) => (prior) => i => {
6
6
  const [o, s] = op(prior)(i);
7
7
  return [o, stateScanToScan(op)(s)];
8
8
  };
9
- export const foldToScan = fold => prior => i => {
9
+ export const foldToScan = (fold) => (prior) => i => {
10
10
  const result = fold(i)(prior);
11
11
  return [result, foldToScan(fold)(result)];
12
12
  };
13
- export const reduceToScan = op => init => [init, foldToScan(op)(init)];
13
+ export const reduceToScan = (op) => init => [init, foldToScan(op)(init)];
14
14
  export const addition = a => b => a + b;
15
15
  export const min = a => b => a < b ? a : b;
16
16
  export const max = a => b => a > b ? a : b;
@@ -1,5 +1,4 @@
1
- import * as _ from "./module.f.js";
2
- const { fn } = _;
1
+ import { fn } from "./module.f.js";
3
2
  export default () => {
4
3
  const f = x => [x];
5
4
  const g = ([x]) => [x.length];
@@ -13,7 +13,7 @@ type Concat<T> = {
13
13
  readonly tail: List<T>;
14
14
  };
15
15
  export declare const concat: <T>(head: List<T>) => (tail: List<T>) => List<T>;
16
- export declare const next: <T>(list: List<T>) => Result<T>;
16
+ export declare const next: <T>(head: List<T>) => Result<T>;
17
17
  export declare const iterable: <T>(list: List<T>) => Iterable<T>;
18
18
  export declare const toArray: <T>(list: List<T>) => readonly T[];
19
19
  export declare const flat: <T>(list: List<List<T>>) => Thunk<T>;
@@ -1,17 +1,17 @@
1
1
  import { identity, fn, compose } from "../function/module.f.js";
2
2
  import { addition, logicalNot, strictEqual, stateScanToScan, foldToScan, reduceToScan, } from "../function/operator/module.f.js";
3
- const fromArray = array => {
4
- const at = i => i < array.length ? { first: array[i], tail: () => at(i + 1) } : null;
3
+ const fromArray = (array) => {
4
+ const at = (i) => i < array.length ? { first: array[i], tail: () => at(i + 1) } : null;
5
5
  return at(0);
6
6
  };
7
- export const concat = head => tail => tail === null ? head : ({ head, tail });
8
- const trampoline = list => {
7
+ export const concat = (head) => (tail) => tail === null ? head : ({ head, tail });
8
+ const trampoline = (list) => {
9
9
  while (typeof list === 'function') {
10
10
  list = list();
11
11
  }
12
12
  return list;
13
13
  };
14
- export const next = head => {
14
+ export const next = (head) => {
15
15
  let tail = null;
16
16
  while (true) {
17
17
  head = trampoline(head);
@@ -31,7 +31,7 @@ export const next = head => {
31
31
  [head, tail] = [tail, null];
32
32
  }
33
33
  };
34
- export const iterable = list => ({
34
+ export const iterable = (list) => ({
35
35
  *[Symbol.iterator]() {
36
36
  let i = list;
37
37
  while (true) {
@@ -45,11 +45,11 @@ export const iterable = list => ({
45
45
  }
46
46
  });
47
47
  const { from } = Array;
48
- export const toArray = list => {
48
+ export const toArray = (list) => {
49
49
  const u = trampoline(list);
50
50
  return u instanceof Array ? u : from(iterable(u));
51
51
  };
52
- const apply = f => input => () => {
52
+ const apply = (f) => (input) => () => {
53
53
  const n = next(input);
54
54
  if (n === null) {
55
55
  return null;
@@ -58,7 +58,7 @@ const apply = f => input => () => {
58
58
  };
59
59
  const flatStep = ({ first, tail }) => concat(first)(flat(tail));
60
60
  export const flat = apply(flatStep);
61
- const mapStep = f => ({ first, tail }) => ({ first: f(first), tail: map(f)(tail) });
61
+ const mapStep = (f) => ({ first, tail }) => ({ first: f(first), tail: map(f)(tail) });
62
62
  export const map = f => apply(mapStep(f));
63
63
  export const flatMap = f => compose(map(f))(flat);
64
64
  const filterStep = f => ({ first, tail }) => {
@@ -1,9 +1,7 @@
1
1
  import * as _ from "./module.f.js";
2
2
  import * as json from "../../json/module.f.js";
3
- import * as o from "../object/module.f.js";
4
- const { sort } = o;
5
- import * as operator from "../function/operator/module.f.js";
6
- const { addition, strictEqual, reduceToScan } = operator;
3
+ import { sort } from "../object/module.f.js";
4
+ import { addition, strictEqual, reduceToScan } from "../function/operator/module.f.js";
7
5
  const stringify = sequence => json.stringify(sort)(_.toArray(sequence));
8
6
  const stringifyTest = () => {
9
7
  const s = stringify([1, 2, 3]);
@@ -1,14 +1,14 @@
1
- import * as BtreeTypes from '../btree/types/module.f.ts';
2
- import * as Compare from '../function/compare/module.f.ts';
3
- import * as list from '../list/module.f.ts';
4
- import * as Operator from '../function/operator/module.f.ts';
1
+ import type * as BtreeTypes from '../btree/types/module.f.ts';
2
+ import type * as Compare from '../function/compare/module.f.ts';
3
+ import { type List } from '../list/module.f.ts';
4
+ import type * as Operator from '../function/operator/module.f.ts';
5
5
  export type Sign = Compare.Sign;
6
6
  export type Entry<T> = readonly [string, T];
7
7
  export type Map<T> = BtreeTypes.Tree<Entry<T>>;
8
8
  export declare const at: (name: string) => <T>(map: Map<T>) => T | null;
9
9
  export declare const setReduce: <T>(reduce: Operator.Reduce<T>) => (name: string) => (value: T) => (map: Map<T>) => Map<T>;
10
10
  export declare const setReplace: (name: string) => <T>(value: T) => (map: Map<T>) => Map<T>;
11
- export declare const entries: <T>(map: Map<T>) => list.List<Entry<T>>;
12
- export declare const fromEntries: <T>(entries: list.List<Entry<T>>) => Map<T>;
11
+ export declare const entries: <T>(map: Map<T>) => List<Entry<T>>;
12
+ export declare const fromEntries: <T>(entries: List<Entry<T>>) => Map<T>;
13
13
  export declare const remove: (name: string) => <T>(map: Map<T>) => Map<T>;
14
14
  export declare const empty: null;
@@ -1,18 +1,9 @@
1
- import * as BtreeTypes from "../btree/types/module.f.js";
2
- import * as btf from "../btree/find/module.f.js";
3
- const { value, find } = btf;
4
- import * as bts from "../btree/set/module.f.js";
5
- const { set } = bts;
6
- import * as btr from "../btree/remove/module.f.js";
7
- const { remove: btreeRemove } = btr;
8
- import * as bt from "../btree/module.f.js";
9
- const { values } = bt;
10
- import * as Compare from "../function/compare/module.f.js";
11
- import * as s from "../string/module.f.js";
12
- const { cmp } = s;
13
- import * as list from "../list/module.f.js";
14
- const { fold } = list;
15
- import * as Operator from "../function/operator/module.f.js";
1
+ import { value, find } from "../btree/find/module.f.js";
2
+ import { set } from "../btree/set/module.f.js";
3
+ import { remove as btreeRemove } from "../btree/remove/module.f.js";
4
+ import { values } from "../btree/module.f.js";
5
+ import { cmp } from "../string/module.f.js";
6
+ import { fold } from "../list/module.f.js";
16
7
  const keyCmp = a => ([b]) => cmp(a)(b);
17
8
  export const at = (name) => (map) => {
18
9
  if (map === null) {
@@ -1,5 +1,4 @@
1
- import * as _ from "./module.f.js";
2
- const { at, setReplace, setReduce, empty, entries, remove } = _;
1
+ import { at, setReplace, setReduce, empty, entries, remove } from "./module.f.js";
3
2
  import * as seq from "../list/module.f.js";
4
3
  export default {
5
4
  main: [
@@ -1,5 +1,5 @@
1
- type NibbleSet = number;
2
- type Nibble = number;
1
+ export type NibbleSet = number;
2
+ export type Nibble = number;
3
3
  export declare const empty = 0;
4
4
  export declare const universe = 65535;
5
5
  export declare const has: (n: Nibble) => (s: NibbleSet) => boolean;
@@ -7,4 +7,3 @@ export declare const set: (n: Nibble) => (s: NibbleSet) => NibbleSet;
7
7
  export declare const complement: (n: NibbleSet) => NibbleSet;
8
8
  export declare const unset: (n: Nibble) => (s: NibbleSet) => NibbleSet;
9
9
  export declare const setRange: (r: readonly [number, number]) => (s: NibbleSet) => NibbleSet;
10
- export {};
@@ -1,5 +1,4 @@
1
- import * as list from "../list/module.f.js";
2
- const { every, map, countdown } = list;
1
+ import { every, map, countdown } from "../list/module.f.js";
3
2
  import * as _ from "./module.f.js";
4
3
  export default {
5
4
  has: () => {
@@ -1,5 +1,4 @@
1
- import * as _ from "./module.f.js";
2
- const { sum, min, max, cmp } = _;
1
+ import { sum, min, max, cmp } from "./module.f.js";
3
2
  export default {
4
3
  sum: () => {
5
4
  const result = sum([2, 3, 4, 5]);
@@ -1,10 +1,10 @@
1
- import * as list from '../list/module.f.ts';
2
- import * as btMap from '../map/module.f.ts';
1
+ import { type List } from '../list/module.f.ts';
2
+ import { type Map as BtMap } from '../map/module.f.ts';
3
3
  export type Map<T> = {
4
4
  readonly [k in string]: T;
5
5
  };
6
6
  export type Entry<T> = readonly [string, T];
7
7
  export declare const at: (name: string) => <T>(object: Map<T>) => T | null;
8
- export declare const sort: <T>(e: list.List<Entry<T>>) => list.List<Entry<T>>;
9
- export declare const fromEntries: <T>(e: list.List<Entry<T>>) => Map<T>;
10
- export declare const fromMap: <T>(m: btMap.Map<T>) => Map<T>;
8
+ export declare const sort: <T>(e: List<Entry<T>>) => List<Entry<T>>;
9
+ export declare const fromEntries: <T>(e: List<Entry<T>>) => Map<T>;
10
+ export declare const fromMap: <T>(m: BtMap<T>) => Map<T>;
@@ -1,7 +1,5 @@
1
- import * as list from "../list/module.f.js";
2
- const { iterable } = list;
3
- import * as btMap from "../map/module.f.js";
4
- const { entries: mapEntries, fromEntries: mapFromEntries } = btMap;
1
+ import { iterable } from "../list/module.f.js";
2
+ import { entries as mapEntries, fromEntries as mapFromEntries } from "../map/module.f.js";
5
3
  const { getOwnPropertyDescriptor, fromEntries: objectFromEntries } = Object;
6
4
  export const at = name => object => {
7
5
  const r = getOwnPropertyDescriptor(object, name);
@@ -1,8 +1,8 @@
1
- import * as sortedList from '../sorted_list/module.f.ts';
2
- import * as O from '../function/operator/module.f.ts';
3
- import * as Range from '../range/module.f.ts';
1
+ import { type SortedList } from '../sorted_list/module.f.ts';
2
+ import type * as O from '../function/operator/module.f.ts';
3
+ import type * as Range from '../range/module.f.ts';
4
4
  export type Entry<T> = [T, number];
5
- export type RangeMap<T> = sortedList.SortedList<Entry<T>>;
5
+ export type RangeMap<T> = SortedList<Entry<T>>;
6
6
  export type RangeMapArray<T> = readonly Entry<T>[];
7
7
  export type Operators<T> = {
8
8
  readonly union: O.Reduce<T>;
@@ -1,12 +1,6 @@
1
- import * as sortedList from "../sorted_list/module.f.js";
2
- const { genericMerge } = sortedList;
3
- import * as list from "../list/module.f.js";
4
- const { next } = list;
5
- import * as Option from "../nullable/module.f.js";
6
- import * as number from "../number/module.f.js";
7
- const { cmp } = number;
8
- import * as O from "../function/operator/module.f.js";
9
- import * as Range from "../range/module.f.js";
1
+ import { genericMerge } from "../sorted_list/module.f.js";
2
+ import { next } from "../list/module.f.js";
3
+ import { cmp } from "../number/module.f.js";
10
4
  const reduceOp = union => equal => state => ([aItem, aMax]) => ([bItem, bMax]) => {
11
5
  const sign = cmp(aMax)(bMax);
12
6
  const min = sign === 1 ? bMax : aMax;
@@ -1,7 +1,6 @@
1
- type Ok<T> = readonly ['ok', T];
2
- type Error<E> = readonly ['error', E];
1
+ export type Ok<T> = readonly ['ok', T];
2
+ export type Error<E> = readonly ['error', E];
3
3
  export type Result<T, E> = Ok<T> | Error<E>;
4
4
  export declare const ok: <T>(value: T) => Ok<T>;
5
5
  export declare const error: <E>(e: E) => Error<E>;
6
6
  export declare const unwrap: <T, E>(r: Result<T, E>) => T;
7
- export {};
@@ -1,16 +1,16 @@
1
- import * as compare from '../function/compare/module.f.ts';
2
- import * as list from '../list/module.f.ts';
3
- import * as option from '../nullable/module.f.ts';
4
- export type SortedList<T> = list.List<T>;
1
+ import type * as compare from '../function/compare/module.f.ts';
2
+ import { type List } from '../list/module.f.ts';
3
+ import type * as option from '../nullable/module.f.ts';
4
+ export type SortedList<T> = List<T>;
5
5
  type SortedArray<T> = readonly T[];
6
6
  type Cmp<T> = (a: T) => (b: T) => compare.Sign;
7
7
  export type ReduceOp<T, S> = (state: S) => (a: T) => (b: T) => readonly [option.Nullable<T>, compare.Sign, S];
8
- export type TailReduce<T, S> = (state: S) => (tail: list.List<T>) => list.List<T>;
8
+ export type TailReduce<T, S> = (state: S) => (tail: List<T>) => List<T>;
9
9
  type MergeReduce<T, S> = {
10
10
  readonly reduceOp: ReduceOp<T, S>;
11
11
  readonly tailReduce: TailReduce<T, S>;
12
12
  };
13
- export declare const genericMerge: <T, S>({ reduceOp, tailReduce }: MergeReduce<T, S>) => (state: S) => (a: list.List<T>) => (b: list.List<T>) => list.List<T>;
13
+ export declare const genericMerge: <T, S>({ reduceOp, tailReduce }: MergeReduce<T, S>) => (state: S) => (a: List<T>) => (b: List<T>) => List<T>;
14
14
  export declare const merge: <T>(cmp: Cmp<T>) => (a: SortedList<T>) => (b: SortedList<T>) => SortedList<T>;
15
15
  export declare const find: <T>(cmp: Cmp<T>) => (value: T) => (array: SortedArray<T>) => T | null;
16
16
  export {};
@@ -1,9 +1,5 @@
1
- import * as compare from "../function/compare/module.f.js";
2
- import * as list from "../list/module.f.js";
3
- import * as option from "../nullable/module.f.js";
4
- const { next } = list;
5
- import * as f from "../function/module.f.js";
6
- const { identity } = f;
1
+ import { next } from "../list/module.f.js";
2
+ import { identity } from "../function/module.f.js";
7
3
  export const genericMerge = ({ reduceOp, tailReduce }) => {
8
4
  const f = state => a => b => () => {
9
5
  const aResult = next(a);
@@ -1,14 +1,9 @@
1
1
  import * as _ from "./module.f.js";
2
- import * as compare from "../function/compare/module.f.js";
3
- const { unsafeCmp } = compare;
2
+ import { unsafeCmp } from "../function/compare/module.f.js";
4
3
  import * as json from "../../json/module.f.js";
5
- import * as object from "../object/module.f.js";
6
- const { sort } = object;
7
- import * as list from "../list/module.f.js";
8
- const { toArray, countdown, length } = list;
9
- import * as Map from "../map/module.f.js";
10
- import * as f from "../function/module.f.js";
11
- const { flip } = f;
4
+ import { sort } from "../object/module.f.js";
5
+ import { toArray, countdown, length } from "../list/module.f.js";
6
+ import { flip } from "../function/module.f.js";
12
7
  const stringify = json.stringify(sort);
13
8
  const reverseCmp = flip(unsafeCmp);
14
9
  export default {
@@ -1,4 +1,4 @@
1
- import * as Compare from '../function/compare/module.f.ts';
1
+ import type * as Compare from '../function/compare/module.f.ts';
2
2
  export type SortedSet<T> = readonly T[];
3
3
  type Cmp<T> = (a: T) => (b: T) => Compare.Sign;
4
4
  export declare const union: <T>(cmp: Cmp<T>) => (a: SortedSet<T>) => (b: SortedSet<T>) => SortedSet<T>;
@@ -1,8 +1,5 @@
1
- import * as Compare from "../function/compare/module.f.js";
2
- import * as list from "../list/module.f.js";
3
- const { toArray } = list;
4
- import * as sortedList from "../sorted_list/module.f.js";
5
- const { merge, genericMerge, find } = sortedList;
1
+ import { toArray } from "../list/module.f.js";
2
+ import { merge, genericMerge, find } from "../sorted_list/module.f.js";
6
3
  export const union = cmp => a => b => toArray(merge(cmp)(a)(b));
7
4
  export const intersect = cmp => a => b => toArray(intersectMerge(cmp)(a)(b));
8
5
  const tailReduce = () => () => null;
@@ -1,14 +1,9 @@
1
1
  import * as _ from "./module.f.js";
2
- import * as compare from "../function/compare/module.f.js";
3
- const { unsafeCmp } = compare;
2
+ import { unsafeCmp } from "../function/compare/module.f.js";
4
3
  import * as json from "../../json/module.f.js";
5
- import * as object from "../object/module.f.js";
6
- const { sort } = object;
7
- import * as list from "../list/module.f.js";
8
- const { toArray, countdown, length } = list;
9
- import * as Map from "../map/module.f.js";
10
- import * as f from "../function/module.f.js";
11
- const { flip } = f;
4
+ import { sort } from "../object/module.f.js";
5
+ import { toArray, countdown, length } from "../list/module.f.js";
6
+ import { flip } from "../function/module.f.js";
12
7
  const stringify = a => json.stringify(sort)(a);
13
8
  const reverseCmp = flip(unsafeCmp);
14
9
  export default {
@@ -1,6 +1,6 @@
1
- import * as list from '../list/module.f.ts';
1
+ import { type List } from '../list/module.f.ts';
2
2
  import * as compare from '../function/compare/module.f.ts';
3
- export declare const join: (_: string) => (input: list.List<string>) => string;
4
- export declare const concat: (input: list.List<string>) => string;
3
+ export declare const join: (_: string) => (input: List<string>) => string;
4
+ export declare const concat: (input: List<string>) => string;
5
5
  export declare const repeat: (n: string) => (v: number) => string;
6
6
  export declare const cmp: (a: string) => (b: string) => compare.Sign;
@@ -1,5 +1,4 @@
1
- import * as list from "../list/module.f.js";
2
- const { reduce: listReduce, repeat: listRepeat } = list;
1
+ import { reduce as listReduce, repeat as listRepeat } from "../list/module.f.js";
3
2
  import { compose } from "../function/module.f.js";
4
3
  import * as compare from "../function/compare/module.f.js";
5
4
  const { unsafeCmp } = compare;
@@ -1,7 +1,5 @@
1
- import * as _ from "./module.f.js";
2
- const { join, concat, repeat, cmp } = _;
3
- import * as list from "../list/module.f.js";
4
- const { repeat: repeatList } = list;
1
+ import { join, concat, repeat, cmp } from "./module.f.js";
2
+ import { repeat as repeatList } from "../list/module.f.js";
5
3
  export default {
6
4
  join: {
7
5
  0: () => {
@@ -1,4 +1,4 @@
1
- import * as BtreeTypes from '../btree/types/module.f.ts';
1
+ import type * as BtreeTypes from '../btree/types/module.f.ts';
2
2
  import { type List } from '../list/module.f.ts';
3
3
  export declare const values: (s: StringSet) => List<string>;
4
4
  export declare const empty: null;
@@ -1,16 +1,10 @@
1
- import * as BtreeTypes from "../btree/types/module.f.js";
2
1
  import * as btree from "../btree/module.f.js";
3
- import * as btf from "../btree/find/module.f.js";
4
- const { find, isFound } = btf;
5
- import * as btr from "../btree/remove/module.f.js";
6
- const { remove: btreeRemove } = btr;
7
- import * as bts from "../btree/set/module.f.js";
8
- const { set: btreeSet } = bts;
9
- import * as string from "../string/module.f.js";
10
- const { cmp } = string;
2
+ import { find, isFound } from "../btree/find/module.f.js";
3
+ import { remove as btreeRemove } from "../btree/remove/module.f.js";
4
+ import { set as btreeSet } from "../btree/set/module.f.js";
5
+ import { cmp } from "../string/module.f.js";
11
6
  import { fold } from "../list/module.f.js";
12
- import * as f from "../function/module.f.js";
13
- const { compose } = f;
7
+ import { compose } from "../function/module.f.js";
14
8
  export const values = btree.values;
15
9
  export const empty = btree.empty;
16
10
  export const contains = value => {