compostjs 0.0.11 → 0.1.0
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.
- package/dist/compost.js +34 -28
- package/dist/core.js +94 -73
- package/dist/fable_modules/fable-library-js.4.28.0/Array.d.ts +123 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Array.js +1242 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Async.d.ts +26 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Async.js +145 -0
- package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.d.ts +59 -0
- package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.js +183 -0
- package/dist/fable_modules/fable-library-js.4.28.0/BigInt.d.ts +115 -0
- package/dist/fable_modules/fable-library-js.4.28.0/BigInt.js +283 -0
- package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.d.ts +27 -0
- package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.js +138 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Boolean.d.ts +3 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Boolean.js +21 -0
- package/dist/fable_modules/fable-library-js.4.28.0/CHANGELOG.md +100 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Char.d.ts +65 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Char.js +169 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Choice.d.ts +121 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Choice.js +184 -0
- package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.d.ts +7 -0
- package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.js +182 -0
- package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.d.ts +9 -0
- package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.js +21 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Date.d.ts +70 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Date.js +748 -0
- package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.d.ts +63 -0
- package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.js +268 -0
- package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.d.ts +18 -0
- package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.js +124 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Decimal.d.ts +45 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Decimal.js +212 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Double.d.ts +11 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Double.js +46 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Encoding.d.ts +12 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Encoding.js +173 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Event.d.ts +31 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Event.js +93 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.d.ts +7 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.js +27 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.d.ts +12 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.js +27 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.d.ts +17 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.js +69 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Global.d.ts +24 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Global.js +8 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Guid.d.ts +10 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Guid.js +142 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Int32.d.ts +28 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Int32.js +135 -0
- package/dist/fable_modules/fable-library-js.4.28.0/List.d.ts +143 -0
- package/dist/fable_modules/fable-library-js.4.28.0/List.js +1273 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Long.d.ts +3 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Long.js +46 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.d.ts +25 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.js +93 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Map.d.ts +178 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Map.js +1396 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.d.ts +12 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.js +127 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.d.ts +52 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.js +327 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.d.ts +39 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.js +233 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Native.d.ts +2 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Native.js +8 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Numeric.d.ts +19 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Numeric.js +71 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Observable.d.ts +32 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Observable.js +113 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Option.d.ts +28 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Option.js +96 -0
- package/dist/fable_modules/fable-library-js.4.28.0/README.md +3 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Random.d.ts +37 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Random.js +170 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Range.d.ts +12 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Range.js +45 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Reflection.d.ts +119 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Reflection.js +461 -0
- package/dist/fable_modules/fable-library-js.4.28.0/RegExp.d.ts +10 -0
- package/dist/fable_modules/fable-library-js.4.28.0/RegExp.js +131 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Result.d.ts +37 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Result.js +165 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Seq.d.ts +165 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Seq.js +1378 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Seq2.d.ts +18 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Seq2.js +111 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Set.d.ts +190 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Set.js +1789 -0
- package/dist/fable_modules/fable-library-js.4.28.0/String.d.ts +58 -0
- package/dist/fable_modules/fable-library-js.4.28.0/String.js +554 -0
- package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.d.ts +79 -0
- package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.js +317 -0
- package/dist/fable_modules/fable-library-js.4.28.0/System.Text.d.ts +38 -0
- package/dist/fable_modules/fable-library-js.4.28.0/System.Text.js +162 -0
- package/dist/fable_modules/fable-library-js.4.28.0/SystemException.d.ts +5 -0
- package/dist/fable_modules/fable-library-js.4.28.0/SystemException.js +5 -0
- package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.d.ts +15 -0
- package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.js +122 -0
- package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.d.ts +34 -0
- package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.js +177 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Timer.d.ts +19 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Timer.js +67 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Types.d.ts +58 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Types.js +208 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.d.ts +2 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.js +4 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Uri.d.ts +31 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Uri.js +159 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Util.d.ts +210 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Util.js +769 -0
- package/dist/fable_modules/fable-library-js.4.28.0/big.d.ts +338 -0
- package/dist/fable_modules/fable-library-js.4.28.0/lib/big.d.ts +5 -0
- package/dist/fable_modules/fable-library-js.4.28.0/lib/big.js +825 -0
- package/dist/fable_modules/fable-library-js.4.28.0/package.json +24 -0
- package/dist/fable_modules/project_cracked.json +1 -0
- package/package.json +5 -4
- package/.claude/settings.local.json +0 -11
- package/copy-latest.sh +0 -1
- package/dist/fable-library.2.10.1/Array.js +0 -1336
- package/dist/fable-library.2.10.1/Async.js +0 -121
- package/dist/fable-library.2.10.1/AsyncBuilder.js +0 -200
- package/dist/fable-library.2.10.1/Date.js +0 -501
- package/dist/fable-library.2.10.1/Decimal.js +0 -208
- package/dist/fable-library.2.10.1/Event.js +0 -193
- package/dist/fable-library.2.10.1/Int32.js +0 -157
- package/dist/fable-library.2.10.1/List.js +0 -1234
- package/dist/fable-library.2.10.1/Long.js +0 -155
- package/dist/fable-library.2.10.1/Map.js +0 -1292
- package/dist/fable-library.2.10.1/MutableMap.js +0 -360
- package/dist/fable-library.2.10.1/MutableSet.js +0 -279
- package/dist/fable-library.2.10.1/Observable.js +0 -131
- package/dist/fable-library.2.10.1/Option.js +0 -118
- package/dist/fable-library.2.10.1/Reflection.js +0 -345
- package/dist/fable-library.2.10.1/RegExp.js +0 -118
- package/dist/fable-library.2.10.1/Seq.js +0 -917
- package/dist/fable-library.2.10.1/Set.js +0 -1692
- package/dist/fable-library.2.10.1/String.js +0 -679
- package/dist/fable-library.2.10.1/Types.js +0 -308
- package/dist/fable-library.2.10.1/Util.js +0 -761
- package/dist/helpers.js +0 -31
- package/dist/lib/big.js +0 -905
- package/dist/lib/long.js +0 -1375
- package/index.html +0 -49
|
@@ -1,1692 +0,0 @@
|
|
|
1
|
-
import { List, Record, declare, Union } from "./Types";
|
|
2
|
-
import { class_type, record_type, bool_type, list_type, union_type, int32_type } from "./Reflection";
|
|
3
|
-
import { value as value$$2, some, Choice } from "./Option";
|
|
4
|
-
import { iterate as iterate$$1, delay, collect, singleton as singleton$$1, empty as empty$$1, fold as fold$$1, toIterator, map as map$$1, reduce, getEnumerator, unfold } from "./Seq";
|
|
5
|
-
import { structuralHash, isDisposable } from "./Util";
|
|
6
|
-
import { join } from "./String";
|
|
7
|
-
import { MutableSet$00601$$Add$$2B595 as MutableSet$002400601$0024$0024Add$0024$00242B595, MutableSet$00601$$$$002Ector$$Z6150332D as MutableSet$002400601$0024$0024$0024$0024002Ector$0024$0024Z6150332D } from "./MutableSet";
|
|
8
|
-
export const SetTree$00601 = declare(function Set_SetTree(tag, name, ...fields) {
|
|
9
|
-
this.tag = tag | 0;
|
|
10
|
-
this.name = name;
|
|
11
|
-
this.fields = fields;
|
|
12
|
-
}, Union);
|
|
13
|
-
export function SetTree$00601$reflection($gen$$3) {
|
|
14
|
-
return union_type("Set.SetTree`1", [$gen$$3], SetTree$00601, () => ["SetEmpty", ["SetNode", [["Item1", $gen$$3], ["Item2", SetTree$00601$reflection($gen$$3)], ["Item3", SetTree$00601$reflection($gen$$3)], ["Item4", int32_type]]], ["SetOne", [["Item", $gen$$3]]]]);
|
|
15
|
-
}
|
|
16
|
-
export function SetTreeModule$$$countAux($s$$4, $acc$$5) {
|
|
17
|
-
SetTreeModule$$$countAux: while (true) {
|
|
18
|
-
const s = $s$$4,
|
|
19
|
-
acc = $acc$$5;
|
|
20
|
-
|
|
21
|
-
switch (s.tag) {
|
|
22
|
-
case 2:
|
|
23
|
-
{
|
|
24
|
-
return acc + 1 | 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
case 0:
|
|
28
|
-
{
|
|
29
|
-
return acc | 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
default:
|
|
33
|
-
{
|
|
34
|
-
$s$$4 = s.fields[1];
|
|
35
|
-
$acc$$5 = SetTreeModule$$$countAux(s.fields[2], acc + 1);
|
|
36
|
-
continue SetTreeModule$$$countAux;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export function SetTreeModule$$$count(s$$1) {
|
|
44
|
-
return SetTreeModule$$$countAux(s$$1, 0);
|
|
45
|
-
}
|
|
46
|
-
export function SetTreeModule$$$SetOne(n) {
|
|
47
|
-
return new SetTree$00601(2, "SetOne", n);
|
|
48
|
-
}
|
|
49
|
-
export function SetTreeModule$$$SetNode(x, l$$1, r$$1, h) {
|
|
50
|
-
return new SetTree$00601(1, "SetNode", x, l$$1, r$$1, h);
|
|
51
|
-
}
|
|
52
|
-
export function SetTreeModule$$$height(t) {
|
|
53
|
-
switch (t.tag) {
|
|
54
|
-
case 2:
|
|
55
|
-
{
|
|
56
|
-
return 1;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
case 1:
|
|
60
|
-
{
|
|
61
|
-
return t.fields[3] | 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
default:
|
|
65
|
-
{
|
|
66
|
-
return 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export const SetTreeModule$$$tolerance = 2;
|
|
71
|
-
export function SetTreeModule$$$mk(l$$2, k, r$$2) {
|
|
72
|
-
var $target$$16;
|
|
73
|
-
|
|
74
|
-
if (l$$2.tag === 0) {
|
|
75
|
-
if (r$$2.tag === 0) {
|
|
76
|
-
$target$$16 = 0;
|
|
77
|
-
} else {
|
|
78
|
-
$target$$16 = 1;
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
$target$$16 = 1;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
switch ($target$$16) {
|
|
85
|
-
case 0:
|
|
86
|
-
{
|
|
87
|
-
return SetTreeModule$$$SetOne(k);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
case 1:
|
|
91
|
-
{
|
|
92
|
-
const hl = SetTreeModule$$$height(l$$2) | 0;
|
|
93
|
-
const hr = SetTreeModule$$$height(r$$2) | 0;
|
|
94
|
-
const m = (hl < hr ? hr : hl) | 0;
|
|
95
|
-
return SetTreeModule$$$SetNode(k, l$$2, r$$2, m + 1);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
export function SetTreeModule$$$rebalance(t1, k$$1, t2) {
|
|
100
|
-
const t1h = SetTreeModule$$$height(t1) | 0;
|
|
101
|
-
const t2h = SetTreeModule$$$height(t2) | 0;
|
|
102
|
-
|
|
103
|
-
if (t2h > t1h + SetTreeModule$$$tolerance) {
|
|
104
|
-
if (t2.tag === 1) {
|
|
105
|
-
if (SetTreeModule$$$height(t2.fields[1]) > t1h + 1) {
|
|
106
|
-
if (t2.fields[1].tag === 1) {
|
|
107
|
-
return SetTreeModule$$$mk(SetTreeModule$$$mk(t1, k$$1, t2.fields[1].fields[1]), t2.fields[1].fields[0], SetTreeModule$$$mk(t2.fields[1].fields[2], t2.fields[0], t2.fields[2]));
|
|
108
|
-
} else {
|
|
109
|
-
throw new Error("rebalance");
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
112
|
-
return SetTreeModule$$$mk(SetTreeModule$$$mk(t1, k$$1, t2.fields[1]), t2.fields[0], t2.fields[2]);
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
115
|
-
throw new Error("rebalance");
|
|
116
|
-
}
|
|
117
|
-
} else if (t1h > t2h + SetTreeModule$$$tolerance) {
|
|
118
|
-
if (t1.tag === 1) {
|
|
119
|
-
if (SetTreeModule$$$height(t1.fields[2]) > t2h + 1) {
|
|
120
|
-
if (t1.fields[2].tag === 1) {
|
|
121
|
-
return SetTreeModule$$$mk(SetTreeModule$$$mk(t1.fields[1], t1.fields[0], t1.fields[2].fields[1]), t1.fields[2].fields[0], SetTreeModule$$$mk(t1.fields[2].fields[2], k$$1, t2));
|
|
122
|
-
} else {
|
|
123
|
-
throw new Error("rebalance");
|
|
124
|
-
}
|
|
125
|
-
} else {
|
|
126
|
-
return SetTreeModule$$$mk(t1.fields[1], t1.fields[0], SetTreeModule$$$mk(t1.fields[2], k$$1, t2));
|
|
127
|
-
}
|
|
128
|
-
} else {
|
|
129
|
-
throw new Error("rebalance");
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
return SetTreeModule$$$mk(t1, k$$1, t2);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
export function SetTreeModule$$$add(comparer, k$$2, t$$1) {
|
|
136
|
-
switch (t$$1.tag) {
|
|
137
|
-
case 2:
|
|
138
|
-
{
|
|
139
|
-
const c$$1 = comparer.Compare(k$$2, t$$1.fields[0]) | 0;
|
|
140
|
-
|
|
141
|
-
if (c$$1 < 0) {
|
|
142
|
-
return SetTreeModule$$$SetNode(k$$2, new SetTree$00601(0, "SetEmpty"), t$$1, 2);
|
|
143
|
-
} else if (c$$1 === 0) {
|
|
144
|
-
return t$$1;
|
|
145
|
-
} else {
|
|
146
|
-
return SetTreeModule$$$SetNode(k$$2, t$$1, new SetTree$00601(0, "SetEmpty"), 2);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
case 0:
|
|
151
|
-
{
|
|
152
|
-
return SetTreeModule$$$SetOne(k$$2);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
default:
|
|
156
|
-
{
|
|
157
|
-
const c = comparer.Compare(k$$2, t$$1.fields[0]) | 0;
|
|
158
|
-
|
|
159
|
-
if (c < 0) {
|
|
160
|
-
return SetTreeModule$$$rebalance(SetTreeModule$$$add(comparer, k$$2, t$$1.fields[1]), t$$1.fields[0], t$$1.fields[2]);
|
|
161
|
-
} else if (c === 0) {
|
|
162
|
-
return t$$1;
|
|
163
|
-
} else {
|
|
164
|
-
return SetTreeModule$$$rebalance(t$$1.fields[1], t$$1.fields[0], SetTreeModule$$$add(comparer, k$$2, t$$1.fields[2]));
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
export function SetTreeModule$$$balance(comparer$$1, t1$$1, k$$3, t2$$1) {
|
|
170
|
-
var $target$$27, t2$$2, t1$$2, k1, t2$$3, k2$$2, t1$$3, h1, h2, k1$$1, k2$$3, t11, t12, t21, t22;
|
|
171
|
-
|
|
172
|
-
if (t1$$1.tag === 2) {
|
|
173
|
-
if (t2$$1.tag === 0) {
|
|
174
|
-
$target$$27 = 1;
|
|
175
|
-
t1$$2 = t1$$1;
|
|
176
|
-
} else if (t2$$1.tag === 2) {
|
|
177
|
-
$target$$27 = 2;
|
|
178
|
-
k1 = t1$$1.fields[0];
|
|
179
|
-
t2$$3 = t2$$1;
|
|
180
|
-
} else {
|
|
181
|
-
$target$$27 = 2;
|
|
182
|
-
k1 = t1$$1.fields[0];
|
|
183
|
-
t2$$3 = t2$$1;
|
|
184
|
-
}
|
|
185
|
-
} else if (t1$$1.tag === 1) {
|
|
186
|
-
if (t2$$1.tag === 2) {
|
|
187
|
-
$target$$27 = 3;
|
|
188
|
-
k2$$2 = t2$$1.fields[0];
|
|
189
|
-
t1$$3 = t1$$1;
|
|
190
|
-
} else if (t2$$1.tag === 1) {
|
|
191
|
-
$target$$27 = 4;
|
|
192
|
-
h1 = t1$$1.fields[3];
|
|
193
|
-
h2 = t2$$1.fields[3];
|
|
194
|
-
k1$$1 = t1$$1.fields[0];
|
|
195
|
-
k2$$3 = t2$$1.fields[0];
|
|
196
|
-
t11 = t1$$1.fields[1];
|
|
197
|
-
t12 = t1$$1.fields[2];
|
|
198
|
-
t21 = t2$$1.fields[1];
|
|
199
|
-
t22 = t2$$1.fields[2];
|
|
200
|
-
} else {
|
|
201
|
-
$target$$27 = 1;
|
|
202
|
-
t1$$2 = t1$$1;
|
|
203
|
-
}
|
|
204
|
-
} else {
|
|
205
|
-
$target$$27 = 0;
|
|
206
|
-
t2$$2 = t2$$1;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
switch ($target$$27) {
|
|
210
|
-
case 0:
|
|
211
|
-
{
|
|
212
|
-
return SetTreeModule$$$add(comparer$$1, k$$3, t2$$2);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
case 1:
|
|
216
|
-
{
|
|
217
|
-
return SetTreeModule$$$add(comparer$$1, k$$3, t1$$2);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
case 2:
|
|
221
|
-
{
|
|
222
|
-
return SetTreeModule$$$add(comparer$$1, k$$3, SetTreeModule$$$add(comparer$$1, k1, t2$$3));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
case 3:
|
|
226
|
-
{
|
|
227
|
-
return SetTreeModule$$$add(comparer$$1, k$$3, SetTreeModule$$$add(comparer$$1, k2$$2, t1$$3));
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
case 4:
|
|
231
|
-
{
|
|
232
|
-
if (h1 + SetTreeModule$$$tolerance < h2) {
|
|
233
|
-
return SetTreeModule$$$rebalance(SetTreeModule$$$balance(comparer$$1, t1$$1, k$$3, t21), k2$$3, t22);
|
|
234
|
-
} else if (h2 + SetTreeModule$$$tolerance < h1) {
|
|
235
|
-
return SetTreeModule$$$rebalance(t11, k1$$1, SetTreeModule$$$balance(comparer$$1, t12, k$$3, t2$$1));
|
|
236
|
-
} else {
|
|
237
|
-
return SetTreeModule$$$mk(t1$$1, k$$3, t2$$1);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
export function SetTreeModule$$$split(comparer$$2, pivot, t$$2) {
|
|
243
|
-
switch (t$$2.tag) {
|
|
244
|
-
case 2:
|
|
245
|
-
{
|
|
246
|
-
const c$$3 = comparer$$2.Compare(t$$2.fields[0], pivot) | 0;
|
|
247
|
-
|
|
248
|
-
if (c$$3 < 0) {
|
|
249
|
-
return [t$$2, false, new SetTree$00601(0, "SetEmpty")];
|
|
250
|
-
} else if (c$$3 === 0) {
|
|
251
|
-
return [new SetTree$00601(0, "SetEmpty"), true, new SetTree$00601(0, "SetEmpty")];
|
|
252
|
-
} else {
|
|
253
|
-
return [new SetTree$00601(0, "SetEmpty"), false, t$$2];
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
case 0:
|
|
258
|
-
{
|
|
259
|
-
return [new SetTree$00601(0, "SetEmpty"), false, new SetTree$00601(0, "SetEmpty")];
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
default:
|
|
263
|
-
{
|
|
264
|
-
const c$$2 = comparer$$2.Compare(pivot, t$$2.fields[0]) | 0;
|
|
265
|
-
|
|
266
|
-
if (c$$2 < 0) {
|
|
267
|
-
const patternInput = SetTreeModule$$$split(comparer$$2, pivot, t$$2.fields[1]);
|
|
268
|
-
return [patternInput[0], patternInput[1], SetTreeModule$$$balance(comparer$$2, patternInput[2], t$$2.fields[0], t$$2.fields[2])];
|
|
269
|
-
} else if (c$$2 === 0) {
|
|
270
|
-
return [t$$2.fields[1], true, t$$2.fields[2]];
|
|
271
|
-
} else {
|
|
272
|
-
const patternInput$$1 = SetTreeModule$$$split(comparer$$2, pivot, t$$2.fields[2]);
|
|
273
|
-
return [SetTreeModule$$$balance(comparer$$2, t$$2.fields[1], t$$2.fields[0], patternInput$$1[0]), patternInput$$1[1], patternInput$$1[2]];
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
export function SetTreeModule$$$spliceOutSuccessor(t$$3) {
|
|
279
|
-
switch (t$$3.tag) {
|
|
280
|
-
case 2:
|
|
281
|
-
{
|
|
282
|
-
return [t$$3.fields[0], new SetTree$00601(0, "SetEmpty")];
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
case 1:
|
|
286
|
-
{
|
|
287
|
-
if (t$$3.fields[1].tag === 0) {
|
|
288
|
-
return [t$$3.fields[0], t$$3.fields[2]];
|
|
289
|
-
} else {
|
|
290
|
-
const patternInput$$2 = SetTreeModule$$$spliceOutSuccessor(t$$3.fields[1]);
|
|
291
|
-
return [patternInput$$2[0], SetTreeModule$$$mk(patternInput$$2[1], t$$3.fields[0], t$$3.fields[2])];
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
default:
|
|
296
|
-
{
|
|
297
|
-
throw new Error("internal error: Set.spliceOutSuccessor");
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
export function SetTreeModule$$$remove(comparer$$3, k$$4, t$$4) {
|
|
302
|
-
switch (t$$4.tag) {
|
|
303
|
-
case 2:
|
|
304
|
-
{
|
|
305
|
-
const c$$4 = comparer$$3.Compare(k$$4, t$$4.fields[0]) | 0;
|
|
306
|
-
|
|
307
|
-
if (c$$4 === 0) {
|
|
308
|
-
return new SetTree$00601(0, "SetEmpty");
|
|
309
|
-
} else {
|
|
310
|
-
return t$$4;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
case 1:
|
|
315
|
-
{
|
|
316
|
-
const c$$5 = comparer$$3.Compare(k$$4, t$$4.fields[0]) | 0;
|
|
317
|
-
|
|
318
|
-
if (c$$5 < 0) {
|
|
319
|
-
return SetTreeModule$$$rebalance(SetTreeModule$$$remove(comparer$$3, k$$4, t$$4.fields[1]), t$$4.fields[0], t$$4.fields[2]);
|
|
320
|
-
} else if (c$$5 === 0) {
|
|
321
|
-
if (t$$4.fields[1].tag === 0) {
|
|
322
|
-
return t$$4.fields[2];
|
|
323
|
-
} else if (t$$4.fields[2].tag === 0) {
|
|
324
|
-
return t$$4.fields[1];
|
|
325
|
-
} else {
|
|
326
|
-
const patternInput$$3 = SetTreeModule$$$spliceOutSuccessor(t$$4.fields[2]);
|
|
327
|
-
return SetTreeModule$$$mk(t$$4.fields[1], patternInput$$3[0], patternInput$$3[1]);
|
|
328
|
-
}
|
|
329
|
-
} else {
|
|
330
|
-
return SetTreeModule$$$rebalance(t$$4.fields[1], t$$4.fields[0], SetTreeModule$$$remove(comparer$$3, k$$4, t$$4.fields[2]));
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
default:
|
|
335
|
-
{
|
|
336
|
-
return t$$4;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
export function SetTreeModule$$$mem($comparer$$4$$35, $k$$5$$36, $t$$5$$37) {
|
|
341
|
-
SetTreeModule$$$mem: while (true) {
|
|
342
|
-
const comparer$$4 = $comparer$$4$$35,
|
|
343
|
-
k$$5 = $k$$5$$36,
|
|
344
|
-
t$$5 = $t$$5$$37;
|
|
345
|
-
|
|
346
|
-
switch (t$$5.tag) {
|
|
347
|
-
case 2:
|
|
348
|
-
{
|
|
349
|
-
return comparer$$4.Compare(k$$5, t$$5.fields[0]) === 0;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
case 0:
|
|
353
|
-
{
|
|
354
|
-
return false;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
default:
|
|
358
|
-
{
|
|
359
|
-
const c$$6 = comparer$$4.Compare(k$$5, t$$5.fields[0]) | 0;
|
|
360
|
-
|
|
361
|
-
if (c$$6 < 0) {
|
|
362
|
-
$comparer$$4$$35 = comparer$$4;
|
|
363
|
-
$k$$5$$36 = k$$5;
|
|
364
|
-
$t$$5$$37 = t$$5.fields[1];
|
|
365
|
-
continue SetTreeModule$$$mem;
|
|
366
|
-
} else if (c$$6 === 0) {
|
|
367
|
-
return true;
|
|
368
|
-
} else {
|
|
369
|
-
$comparer$$4$$35 = comparer$$4;
|
|
370
|
-
$k$$5$$36 = k$$5;
|
|
371
|
-
$t$$5$$37 = t$$5.fields[2];
|
|
372
|
-
continue SetTreeModule$$$mem;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
break;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
export function SetTreeModule$$$iter($f$$38, $t$$6$$39) {
|
|
381
|
-
SetTreeModule$$$iter: while (true) {
|
|
382
|
-
const f = $f$$38,
|
|
383
|
-
t$$6 = $t$$6$$39;
|
|
384
|
-
|
|
385
|
-
switch (t$$6.tag) {
|
|
386
|
-
case 2:
|
|
387
|
-
{
|
|
388
|
-
f(t$$6.fields[0]);
|
|
389
|
-
break;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
case 0:
|
|
393
|
-
{
|
|
394
|
-
void null;
|
|
395
|
-
break;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
default:
|
|
399
|
-
{
|
|
400
|
-
SetTreeModule$$$iter(f, t$$6.fields[1]);
|
|
401
|
-
f(t$$6.fields[0]);
|
|
402
|
-
$f$$38 = f;
|
|
403
|
-
$t$$6$$39 = t$$6.fields[2];
|
|
404
|
-
continue SetTreeModule$$$iter;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
break;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
export function SetTreeModule$$$foldBack($f$$1$$40, $m$$1$$41, $x$$1$$42) {
|
|
412
|
-
SetTreeModule$$$foldBack: while (true) {
|
|
413
|
-
const f$$1 = $f$$1$$40,
|
|
414
|
-
m$$1 = $m$$1$$41,
|
|
415
|
-
x$$1 = $x$$1$$42;
|
|
416
|
-
|
|
417
|
-
switch (m$$1.tag) {
|
|
418
|
-
case 2:
|
|
419
|
-
{
|
|
420
|
-
return f$$1(m$$1.fields[0], x$$1);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
case 0:
|
|
424
|
-
{
|
|
425
|
-
return x$$1;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
default:
|
|
429
|
-
{
|
|
430
|
-
$f$$1$$40 = f$$1;
|
|
431
|
-
$m$$1$$41 = m$$1.fields[1];
|
|
432
|
-
$x$$1$$42 = f$$1(m$$1.fields[0], SetTreeModule$$$foldBack(f$$1, m$$1.fields[2], x$$1));
|
|
433
|
-
continue SetTreeModule$$$foldBack;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
break;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
export function SetTreeModule$$$fold($f$$2$$43, $x$$2$$44, $m$$2$$45) {
|
|
441
|
-
SetTreeModule$$$fold: while (true) {
|
|
442
|
-
const f$$2 = $f$$2$$43,
|
|
443
|
-
x$$2 = $x$$2$$44,
|
|
444
|
-
m$$2 = $m$$2$$45;
|
|
445
|
-
|
|
446
|
-
switch (m$$2.tag) {
|
|
447
|
-
case 2:
|
|
448
|
-
{
|
|
449
|
-
return f$$2(x$$2, m$$2.fields[0]);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
case 0:
|
|
453
|
-
{
|
|
454
|
-
return x$$2;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
default:
|
|
458
|
-
{
|
|
459
|
-
const x$$3 = SetTreeModule$$$fold(f$$2, x$$2, m$$2.fields[1]);
|
|
460
|
-
const x$$4 = f$$2(x$$3, m$$2.fields[0]);
|
|
461
|
-
$f$$2$$43 = f$$2;
|
|
462
|
-
$x$$2$$44 = x$$4;
|
|
463
|
-
$m$$2$$45 = m$$2.fields[2];
|
|
464
|
-
continue SetTreeModule$$$fold;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
break;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
export function SetTreeModule$$$forall($f$$3$$46, $m$$3$$47) {
|
|
472
|
-
SetTreeModule$$$forall: while (true) {
|
|
473
|
-
const f$$3 = $f$$3$$46,
|
|
474
|
-
m$$3 = $m$$3$$47;
|
|
475
|
-
|
|
476
|
-
switch (m$$3.tag) {
|
|
477
|
-
case 2:
|
|
478
|
-
{
|
|
479
|
-
return f$$3(m$$3.fields[0]);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
case 0:
|
|
483
|
-
{
|
|
484
|
-
return true;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
default:
|
|
488
|
-
{
|
|
489
|
-
if (f$$3(m$$3.fields[0]) ? SetTreeModule$$$forall(f$$3, m$$3.fields[1]) : false) {
|
|
490
|
-
$f$$3$$46 = f$$3;
|
|
491
|
-
$m$$3$$47 = m$$3.fields[2];
|
|
492
|
-
continue SetTreeModule$$$forall;
|
|
493
|
-
} else {
|
|
494
|
-
return false;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
break;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
export function SetTreeModule$$$exists($f$$4$$48, $m$$4$$49) {
|
|
503
|
-
SetTreeModule$$$exists: while (true) {
|
|
504
|
-
const f$$4 = $f$$4$$48,
|
|
505
|
-
m$$4 = $m$$4$$49;
|
|
506
|
-
|
|
507
|
-
switch (m$$4.tag) {
|
|
508
|
-
case 2:
|
|
509
|
-
{
|
|
510
|
-
return f$$4(m$$4.fields[0]);
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
case 0:
|
|
514
|
-
{
|
|
515
|
-
return false;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
default:
|
|
519
|
-
{
|
|
520
|
-
if (f$$4(m$$4.fields[0]) ? true : SetTreeModule$$$exists(f$$4, m$$4.fields[1])) {
|
|
521
|
-
return true;
|
|
522
|
-
} else {
|
|
523
|
-
$f$$4$$48 = f$$4;
|
|
524
|
-
$m$$4$$49 = m$$4.fields[2];
|
|
525
|
-
continue SetTreeModule$$$exists;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
break;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
export function SetTreeModule$$$isEmpty(m$$5) {
|
|
534
|
-
if (m$$5.tag === 0) {
|
|
535
|
-
return true;
|
|
536
|
-
} else {
|
|
537
|
-
return false;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
export function SetTreeModule$$$subset(comparer$$5, a, b) {
|
|
541
|
-
return SetTreeModule$$$forall(function (x$$5) {
|
|
542
|
-
return SetTreeModule$$$mem(comparer$$5, x$$5, b);
|
|
543
|
-
}, a);
|
|
544
|
-
}
|
|
545
|
-
export function SetTreeModule$$$psubset(comparer$$6, a$$1, b$$1) {
|
|
546
|
-
if (SetTreeModule$$$forall(function (x$$6) {
|
|
547
|
-
return SetTreeModule$$$mem(comparer$$6, x$$6, b$$1);
|
|
548
|
-
}, a$$1)) {
|
|
549
|
-
return SetTreeModule$$$exists(function (x$$7) {
|
|
550
|
-
return !SetTreeModule$$$mem(comparer$$6, x$$7, a$$1);
|
|
551
|
-
}, b$$1);
|
|
552
|
-
} else {
|
|
553
|
-
return false;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
export function SetTreeModule$$$filterAux($comparer$$7$$57, $f$$5$$58, $s$$2$$59, $acc$$1$$60) {
|
|
557
|
-
SetTreeModule$$$filterAux: while (true) {
|
|
558
|
-
const comparer$$7 = $comparer$$7$$57,
|
|
559
|
-
f$$5 = $f$$5$$58,
|
|
560
|
-
s$$2 = $s$$2$$59,
|
|
561
|
-
acc$$1 = $acc$$1$$60;
|
|
562
|
-
|
|
563
|
-
switch (s$$2.tag) {
|
|
564
|
-
case 2:
|
|
565
|
-
{
|
|
566
|
-
if (f$$5(s$$2.fields[0])) {
|
|
567
|
-
return SetTreeModule$$$add(comparer$$7, s$$2.fields[0], acc$$1);
|
|
568
|
-
} else {
|
|
569
|
-
return acc$$1;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
case 0:
|
|
574
|
-
{
|
|
575
|
-
return acc$$1;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
default:
|
|
579
|
-
{
|
|
580
|
-
const acc$$2 = f$$5(s$$2.fields[0]) ? SetTreeModule$$$add(comparer$$7, s$$2.fields[0], acc$$1) : acc$$1;
|
|
581
|
-
$comparer$$7$$57 = comparer$$7;
|
|
582
|
-
$f$$5$$58 = f$$5;
|
|
583
|
-
$s$$2$$59 = s$$2.fields[1];
|
|
584
|
-
$acc$$1$$60 = SetTreeModule$$$filterAux(comparer$$7, f$$5, s$$2.fields[2], acc$$2);
|
|
585
|
-
continue SetTreeModule$$$filterAux;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
break;
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
export function SetTreeModule$$$filter(comparer$$8, f$$6, s$$3) {
|
|
593
|
-
return SetTreeModule$$$filterAux(comparer$$8, f$$6, s$$3, new SetTree$00601(0, "SetEmpty"));
|
|
594
|
-
}
|
|
595
|
-
export function SetTreeModule$$$diffAux($comparer$$9$$64, $m$$6$$65, $acc$$3$$66) {
|
|
596
|
-
SetTreeModule$$$diffAux: while (true) {
|
|
597
|
-
const comparer$$9 = $comparer$$9$$64,
|
|
598
|
-
m$$6 = $m$$6$$65,
|
|
599
|
-
acc$$3 = $acc$$3$$66;
|
|
600
|
-
|
|
601
|
-
switch (m$$6.tag) {
|
|
602
|
-
case 2:
|
|
603
|
-
{
|
|
604
|
-
return SetTreeModule$$$remove(comparer$$9, m$$6.fields[0], acc$$3);
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
case 0:
|
|
608
|
-
{
|
|
609
|
-
return acc$$3;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
default:
|
|
613
|
-
{
|
|
614
|
-
$comparer$$9$$64 = comparer$$9;
|
|
615
|
-
$m$$6$$65 = m$$6.fields[1];
|
|
616
|
-
$acc$$3$$66 = SetTreeModule$$$diffAux(comparer$$9, m$$6.fields[2], SetTreeModule$$$remove(comparer$$9, m$$6.fields[0], acc$$3));
|
|
617
|
-
continue SetTreeModule$$$diffAux;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
break;
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
export function SetTreeModule$$$diff(comparer$$10, a$$2, b$$2) {
|
|
625
|
-
return SetTreeModule$$$diffAux(comparer$$10, b$$2, a$$2);
|
|
626
|
-
}
|
|
627
|
-
export function SetTreeModule$$$union(comparer$$11, t1$$4, t2$$4) {
|
|
628
|
-
var $target$$73, h1$$1, h2$$1, k1$$4, k2$$16, t11$$2, t12$$2, t21$$1, t22$$1, t$$7, t$$8, k1$$5, t2$$5, k2$$17, t1$$5;
|
|
629
|
-
|
|
630
|
-
if (t1$$4.tag === 0) {
|
|
631
|
-
$target$$73 = 1;
|
|
632
|
-
t$$7 = t2$$4;
|
|
633
|
-
} else if (t1$$4.tag === 2) {
|
|
634
|
-
if (t2$$4.tag === 0) {
|
|
635
|
-
$target$$73 = 2;
|
|
636
|
-
t$$8 = t1$$4;
|
|
637
|
-
} else if (t2$$4.tag === 2) {
|
|
638
|
-
$target$$73 = 3;
|
|
639
|
-
k1$$5 = t1$$4.fields[0];
|
|
640
|
-
t2$$5 = t2$$4;
|
|
641
|
-
} else {
|
|
642
|
-
$target$$73 = 3;
|
|
643
|
-
k1$$5 = t1$$4.fields[0];
|
|
644
|
-
t2$$5 = t2$$4;
|
|
645
|
-
}
|
|
646
|
-
} else if (t2$$4.tag === 0) {
|
|
647
|
-
$target$$73 = 2;
|
|
648
|
-
t$$8 = t1$$4;
|
|
649
|
-
} else if (t2$$4.tag === 2) {
|
|
650
|
-
$target$$73 = 4;
|
|
651
|
-
k2$$17 = t2$$4.fields[0];
|
|
652
|
-
t1$$5 = t1$$4;
|
|
653
|
-
} else {
|
|
654
|
-
$target$$73 = 0;
|
|
655
|
-
h1$$1 = t1$$4.fields[3];
|
|
656
|
-
h2$$1 = t2$$4.fields[3];
|
|
657
|
-
k1$$4 = t1$$4.fields[0];
|
|
658
|
-
k2$$16 = t2$$4.fields[0];
|
|
659
|
-
t11$$2 = t1$$4.fields[1];
|
|
660
|
-
t12$$2 = t1$$4.fields[2];
|
|
661
|
-
t21$$1 = t2$$4.fields[1];
|
|
662
|
-
t22$$1 = t2$$4.fields[2];
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
switch ($target$$73) {
|
|
666
|
-
case 0:
|
|
667
|
-
{
|
|
668
|
-
if (h1$$1 > h2$$1) {
|
|
669
|
-
const patternInput$$4 = SetTreeModule$$$split(comparer$$11, k1$$4, t2$$4);
|
|
670
|
-
return SetTreeModule$$$balance(comparer$$11, SetTreeModule$$$union(comparer$$11, t11$$2, patternInput$$4[0]), k1$$4, SetTreeModule$$$union(comparer$$11, t12$$2, patternInput$$4[2]));
|
|
671
|
-
} else {
|
|
672
|
-
const patternInput$$5 = SetTreeModule$$$split(comparer$$11, k2$$16, t1$$4);
|
|
673
|
-
return SetTreeModule$$$balance(comparer$$11, SetTreeModule$$$union(comparer$$11, t21$$1, patternInput$$5[0]), k2$$16, SetTreeModule$$$union(comparer$$11, t22$$1, patternInput$$5[2]));
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
case 1:
|
|
678
|
-
{
|
|
679
|
-
return t$$7;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
case 2:
|
|
683
|
-
{
|
|
684
|
-
return t$$8;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
case 3:
|
|
688
|
-
{
|
|
689
|
-
return SetTreeModule$$$add(comparer$$11, k1$$5, t2$$5);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
case 4:
|
|
693
|
-
{
|
|
694
|
-
return SetTreeModule$$$add(comparer$$11, k2$$17, t1$$5);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
export function SetTreeModule$$$intersectionAux($comparer$$12$$74, $b$$3$$75, $m$$7$$76, $acc$$4$$77) {
|
|
699
|
-
SetTreeModule$$$intersectionAux: while (true) {
|
|
700
|
-
const comparer$$12 = $comparer$$12$$74,
|
|
701
|
-
b$$3 = $b$$3$$75,
|
|
702
|
-
m$$7 = $m$$7$$76,
|
|
703
|
-
acc$$4 = $acc$$4$$77;
|
|
704
|
-
|
|
705
|
-
switch (m$$7.tag) {
|
|
706
|
-
case 2:
|
|
707
|
-
{
|
|
708
|
-
if (SetTreeModule$$$mem(comparer$$12, m$$7.fields[0], b$$3)) {
|
|
709
|
-
return SetTreeModule$$$add(comparer$$12, m$$7.fields[0], acc$$4);
|
|
710
|
-
} else {
|
|
711
|
-
return acc$$4;
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
case 0:
|
|
716
|
-
{
|
|
717
|
-
return acc$$4;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
default:
|
|
721
|
-
{
|
|
722
|
-
const acc$$5 = SetTreeModule$$$intersectionAux(comparer$$12, b$$3, m$$7.fields[2], acc$$4);
|
|
723
|
-
const acc$$6 = SetTreeModule$$$mem(comparer$$12, m$$7.fields[0], b$$3) ? SetTreeModule$$$add(comparer$$12, m$$7.fields[0], acc$$5) : acc$$5;
|
|
724
|
-
$comparer$$12$$74 = comparer$$12;
|
|
725
|
-
$b$$3$$75 = b$$3;
|
|
726
|
-
$m$$7$$76 = m$$7.fields[1];
|
|
727
|
-
$acc$$4$$77 = acc$$6;
|
|
728
|
-
continue SetTreeModule$$$intersectionAux;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
break;
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
export function SetTreeModule$$$intersection(comparer$$13, a$$3, b$$4) {
|
|
736
|
-
return SetTreeModule$$$intersectionAux(comparer$$13, b$$4, a$$3, new SetTree$00601(0, "SetEmpty"));
|
|
737
|
-
}
|
|
738
|
-
export function SetTreeModule$$$partition1(comparer$$14, f$$7, k$$16, acc1, acc2) {
|
|
739
|
-
if (f$$7(k$$16)) {
|
|
740
|
-
return [SetTreeModule$$$add(comparer$$14, k$$16, acc1), acc2];
|
|
741
|
-
} else {
|
|
742
|
-
return [acc1, SetTreeModule$$$add(comparer$$14, k$$16, acc2)];
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
export function SetTreeModule$$$partitionAux($comparer$$15$$86, $f$$8$$87, $s$$4$$88, $acc_0$$89, $acc_1$$90) {
|
|
746
|
-
SetTreeModule$$$partitionAux: while (true) {
|
|
747
|
-
const comparer$$15 = $comparer$$15$$86,
|
|
748
|
-
f$$8 = $f$$8$$87,
|
|
749
|
-
s$$4 = $s$$4$$88,
|
|
750
|
-
acc_0 = $acc_0$$89,
|
|
751
|
-
acc_1 = $acc_1$$90;
|
|
752
|
-
|
|
753
|
-
switch (s$$4.tag) {
|
|
754
|
-
case 2:
|
|
755
|
-
{
|
|
756
|
-
return SetTreeModule$$$partition1(comparer$$15, f$$8, s$$4.fields[0], acc_0, acc_1);
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
case 0:
|
|
760
|
-
{
|
|
761
|
-
return [acc_0, acc_1];
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
default:
|
|
765
|
-
{
|
|
766
|
-
const acc$$8 = SetTreeModule$$$partitionAux(comparer$$15, f$$8, s$$4.fields[2], acc_0, acc_1);
|
|
767
|
-
const acc$$9 = SetTreeModule$$$partition1(comparer$$15, f$$8, s$$4.fields[0], acc$$8[0], acc$$8[1]);
|
|
768
|
-
$comparer$$15$$86 = comparer$$15;
|
|
769
|
-
$f$$8$$87 = f$$8;
|
|
770
|
-
$s$$4$$88 = s$$4.fields[1];
|
|
771
|
-
$acc_0$$89 = acc$$9[0];
|
|
772
|
-
$acc_1$$90 = acc$$9[1];
|
|
773
|
-
continue SetTreeModule$$$partitionAux;
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
break;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
export function SetTreeModule$$$partition(comparer$$16, f$$9, s$$5) {
|
|
781
|
-
const seed = [new SetTree$00601(0, "SetEmpty"), new SetTree$00601(0, "SetEmpty")];
|
|
782
|
-
return SetTreeModule$$$partitionAux(comparer$$16, f$$9, s$$5, seed[0], seed[1]);
|
|
783
|
-
}
|
|
784
|
-
export function SetTreeModule$$$$007CMatchSetNode$007CMatchSetEmpty$007C(s$$6) {
|
|
785
|
-
switch (s$$6.tag) {
|
|
786
|
-
case 2:
|
|
787
|
-
{
|
|
788
|
-
return new Choice(0, "Choice1Of2", [s$$6.fields[0], new SetTree$00601(0, "SetEmpty"), new SetTree$00601(0, "SetEmpty")]);
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
case 0:
|
|
792
|
-
{
|
|
793
|
-
return new Choice(1, "Choice2Of2", void null);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
default:
|
|
797
|
-
{
|
|
798
|
-
return new Choice(0, "Choice1Of2", [s$$6.fields[0], s$$6.fields[1], s$$6.fields[2]]);
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
export function SetTreeModule$$$minimumElementAux($s$$7$$95, $n$$1$$96) {
|
|
803
|
-
SetTreeModule$$$minimumElementAux: while (true) {
|
|
804
|
-
const s$$7 = $s$$7$$95,
|
|
805
|
-
n$$1 = $n$$1$$96;
|
|
806
|
-
|
|
807
|
-
switch (s$$7.tag) {
|
|
808
|
-
case 2:
|
|
809
|
-
{
|
|
810
|
-
return s$$7.fields[0];
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
case 0:
|
|
814
|
-
{
|
|
815
|
-
return n$$1;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
default:
|
|
819
|
-
{
|
|
820
|
-
$s$$7$$95 = s$$7.fields[1];
|
|
821
|
-
$n$$1$$96 = s$$7.fields[0];
|
|
822
|
-
continue SetTreeModule$$$minimumElementAux;
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
break;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
export function SetTreeModule$$$minimumElementOpt(s$$8) {
|
|
830
|
-
switch (s$$8.tag) {
|
|
831
|
-
case 2:
|
|
832
|
-
{
|
|
833
|
-
return some(s$$8.fields[0]);
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
case 0:
|
|
837
|
-
{
|
|
838
|
-
return undefined;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
default:
|
|
842
|
-
{
|
|
843
|
-
return some(SetTreeModule$$$minimumElementAux(s$$8.fields[1], s$$8.fields[0]));
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
export function SetTreeModule$$$maximumElementAux($s$$9$$98, $n$$2$$99) {
|
|
848
|
-
SetTreeModule$$$maximumElementAux: while (true) {
|
|
849
|
-
const s$$9 = $s$$9$$98,
|
|
850
|
-
n$$2 = $n$$2$$99;
|
|
851
|
-
|
|
852
|
-
switch (s$$9.tag) {
|
|
853
|
-
case 2:
|
|
854
|
-
{
|
|
855
|
-
return s$$9.fields[0];
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
case 0:
|
|
859
|
-
{
|
|
860
|
-
return n$$2;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
default:
|
|
864
|
-
{
|
|
865
|
-
$s$$9$$98 = s$$9.fields[2];
|
|
866
|
-
$n$$2$$99 = s$$9.fields[0];
|
|
867
|
-
continue SetTreeModule$$$maximumElementAux;
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
break;
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
export function SetTreeModule$$$maximumElementOpt(s$$10) {
|
|
875
|
-
switch (s$$10.tag) {
|
|
876
|
-
case 2:
|
|
877
|
-
{
|
|
878
|
-
return some(s$$10.fields[0]);
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
case 0:
|
|
882
|
-
{
|
|
883
|
-
return undefined;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
default:
|
|
887
|
-
{
|
|
888
|
-
return some(SetTreeModule$$$maximumElementAux(s$$10.fields[2], s$$10.fields[0]));
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
export function SetTreeModule$$$minimumElement(s$$11) {
|
|
893
|
-
const matchValue$$4 = SetTreeModule$$$minimumElementOpt(s$$11);
|
|
894
|
-
|
|
895
|
-
if (matchValue$$4 == null) {
|
|
896
|
-
throw new Error("Set contains no elements");
|
|
897
|
-
} else {
|
|
898
|
-
const k$$27 = value$$2(matchValue$$4);
|
|
899
|
-
return k$$27;
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
export function SetTreeModule$$$maximumElement(s$$12) {
|
|
903
|
-
const matchValue$$5 = SetTreeModule$$$maximumElementOpt(s$$12);
|
|
904
|
-
|
|
905
|
-
if (matchValue$$5 == null) {
|
|
906
|
-
throw new Error("Set contains no elements");
|
|
907
|
-
} else {
|
|
908
|
-
const k$$28 = value$$2(matchValue$$5);
|
|
909
|
-
return k$$28;
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
export const SetTreeModule$002ESetIterator$00601 = declare(function Set_SetTreeModule_SetIterator(stack, started) {
|
|
913
|
-
this.stack = stack;
|
|
914
|
-
this.started = started;
|
|
915
|
-
}, Record);
|
|
916
|
-
export function SetTreeModule$002ESetIterator$00601$reflection($gen$$103) {
|
|
917
|
-
return record_type("Set.SetTreeModule.SetIterator`1", [$gen$$103], SetTreeModule$002ESetIterator$00601, () => [["stack", list_type(SetTree$00601$reflection($gen$$103))], ["started", bool_type]]);
|
|
918
|
-
}
|
|
919
|
-
export function SetTreeModule$$$collapseLHS($stack$$104) {
|
|
920
|
-
SetTreeModule$$$collapseLHS: while (true) {
|
|
921
|
-
const stack = $stack$$104;
|
|
922
|
-
|
|
923
|
-
if (stack.tail != null) {
|
|
924
|
-
if (stack.head.tag === 2) {
|
|
925
|
-
return stack;
|
|
926
|
-
} else if (stack.head.tag === 1) {
|
|
927
|
-
$stack$$104 = new List(stack.head.fields[1], new List(SetTreeModule$$$SetOne(stack.head.fields[0]), new List(stack.head.fields[2], stack.tail)));
|
|
928
|
-
continue SetTreeModule$$$collapseLHS;
|
|
929
|
-
} else {
|
|
930
|
-
$stack$$104 = stack.tail;
|
|
931
|
-
continue SetTreeModule$$$collapseLHS;
|
|
932
|
-
}
|
|
933
|
-
} else {
|
|
934
|
-
return new List();
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
break;
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
export function SetTreeModule$$$mkIterator(s$$13) {
|
|
941
|
-
return new SetTreeModule$002ESetIterator$00601(SetTreeModule$$$collapseLHS(new List(s$$13, new List())), false);
|
|
942
|
-
}
|
|
943
|
-
export function SetTreeModule$$$notStarted() {
|
|
944
|
-
throw new Error("Enumeration not started");
|
|
945
|
-
}
|
|
946
|
-
export function SetTreeModule$$$alreadyFinished() {
|
|
947
|
-
throw new Error("Enumeration already started");
|
|
948
|
-
}
|
|
949
|
-
export function SetTreeModule$$$current(i) {
|
|
950
|
-
if (i.started) {
|
|
951
|
-
const matchValue$$6 = i.stack;
|
|
952
|
-
|
|
953
|
-
if (matchValue$$6.tail == null) {
|
|
954
|
-
return SetTreeModule$$$alreadyFinished();
|
|
955
|
-
} else if (matchValue$$6.head.tag === 2) {
|
|
956
|
-
return matchValue$$6.head.fields[0];
|
|
957
|
-
} else {
|
|
958
|
-
throw new Error("Please report error: Set iterator, unexpected stack for current");
|
|
959
|
-
}
|
|
960
|
-
} else {
|
|
961
|
-
return SetTreeModule$$$notStarted();
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
export function SetTreeModule$$$moveNext(i$$1) {
|
|
965
|
-
if (i$$1.started) {
|
|
966
|
-
const matchValue$$7 = i$$1.stack;
|
|
967
|
-
|
|
968
|
-
if (matchValue$$7.tail == null) {
|
|
969
|
-
return false;
|
|
970
|
-
} else if (matchValue$$7.head.tag === 2) {
|
|
971
|
-
i$$1.stack = SetTreeModule$$$collapseLHS(matchValue$$7.tail);
|
|
972
|
-
return !(i$$1.stack.tail == null);
|
|
973
|
-
} else {
|
|
974
|
-
throw new Error("Please report error: Set iterator, unexpected stack for moveNext");
|
|
975
|
-
}
|
|
976
|
-
} else {
|
|
977
|
-
i$$1.started = true;
|
|
978
|
-
return !(i$$1.stack.tail == null);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
export const SetTreeModule$002EmkIEnumerator$00601 = declare(function Set_SetTreeModule_mkIEnumerator(s$$14) {
|
|
982
|
-
const $this$$1 = this;
|
|
983
|
-
$this$$1.s = s$$14;
|
|
984
|
-
$this$$1.i = SetTreeModule$$$mkIterator($this$$1.s);
|
|
985
|
-
void null;
|
|
986
|
-
});
|
|
987
|
-
export function SetTreeModule$002EmkIEnumerator$00601$reflection($gen$$108) {
|
|
988
|
-
return class_type("Set.SetTreeModule.mkIEnumerator`1", [$gen$$108], SetTreeModule$002EmkIEnumerator$00601);
|
|
989
|
-
}
|
|
990
|
-
export function SetTreeModule$002EmkIEnumerator$00601$$$$002Ector$$Z5B395D56(s$$14) {
|
|
991
|
-
return this instanceof SetTreeModule$002EmkIEnumerator$00601 ? SetTreeModule$002EmkIEnumerator$00601.call(this, s$$14) : new SetTreeModule$002EmkIEnumerator$00601(s$$14);
|
|
992
|
-
}
|
|
993
|
-
Object.defineProperty(SetTreeModule$002EmkIEnumerator$00601.prototype, "Current", {
|
|
994
|
-
"get": function () {
|
|
995
|
-
const __ = this;
|
|
996
|
-
|
|
997
|
-
return SetTreeModule$$$current(__.i);
|
|
998
|
-
}
|
|
999
|
-
});
|
|
1000
|
-
|
|
1001
|
-
SetTreeModule$002EmkIEnumerator$00601.prototype.MoveNext = function () {
|
|
1002
|
-
const __$$1 = this;
|
|
1003
|
-
|
|
1004
|
-
return SetTreeModule$$$moveNext(__$$1.i);
|
|
1005
|
-
};
|
|
1006
|
-
|
|
1007
|
-
SetTreeModule$002EmkIEnumerator$00601.prototype.Reset = function () {
|
|
1008
|
-
const __$$2 = this;
|
|
1009
|
-
|
|
1010
|
-
__$$2.i = SetTreeModule$$$mkIterator(__$$2.s);
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
SetTreeModule$002EmkIEnumerator$00601.prototype.Dispose = function () {
|
|
1014
|
-
void null;
|
|
1015
|
-
};
|
|
1016
|
-
|
|
1017
|
-
export function SetTreeModule$$$mkIEnumerator(s$$15) {
|
|
1018
|
-
return SetTreeModule$002EmkIEnumerator$00601$$$$002Ector$$Z5B395D56(s$$15);
|
|
1019
|
-
}
|
|
1020
|
-
export function SetTreeModule$$$toSeq(s$$16) {
|
|
1021
|
-
const en = SetTreeModule$$$mkIEnumerator(s$$16);
|
|
1022
|
-
return unfold(function generator(en$$1) {
|
|
1023
|
-
if (en$$1.MoveNext()) {
|
|
1024
|
-
return [en$$1.Current, en$$1];
|
|
1025
|
-
} else {
|
|
1026
|
-
return undefined;
|
|
1027
|
-
}
|
|
1028
|
-
}, en);
|
|
1029
|
-
}
|
|
1030
|
-
export function SetTreeModule$$$compareStacks($comparer$$17$$112, $l1$$113, $l2$$114) {
|
|
1031
|
-
SetTreeModule$$$compareStacks: while (true) {
|
|
1032
|
-
const comparer$$17 = $comparer$$17$$112,
|
|
1033
|
-
l1 = $l1$$113,
|
|
1034
|
-
l2 = $l2$$114;
|
|
1035
|
-
var $target$$115, t1$$6, t2$$6, n1k, n2k, t1$$7, t2$$7, n1k$$1, n2k$$1, n2r, t1$$8, t2$$8, emp, n1k$$2, n1r, n2k$$2, t1$$9, t2$$9, n1k$$3, n1r$$1, n2k$$3, n2r$$1, t1$$10, t2$$10, n1k$$4, t1$$11, n1k$$5, n1l, n1r$$2, t1$$12, n2k$$4, t2$$11, n2k$$5, n2l, n2r$$2, t2$$12;
|
|
1036
|
-
|
|
1037
|
-
if (l1.tail != null) {
|
|
1038
|
-
if (l2.tail != null) {
|
|
1039
|
-
if (l2.head.tag === 2) {
|
|
1040
|
-
if (l1.head.tag === 2) {
|
|
1041
|
-
$target$$115 = 4;
|
|
1042
|
-
n1k = l1.head.fields[0];
|
|
1043
|
-
n2k = l2.head.fields[0];
|
|
1044
|
-
t1$$7 = l1.tail;
|
|
1045
|
-
t2$$7 = l2.tail;
|
|
1046
|
-
} else if (l1.head.tag === 1) {
|
|
1047
|
-
if (l1.head.fields[1].tag === 0) {
|
|
1048
|
-
$target$$115 = 6;
|
|
1049
|
-
emp = l1.head.fields[1];
|
|
1050
|
-
n1k$$2 = l1.head.fields[0];
|
|
1051
|
-
n1r = l1.head.fields[2];
|
|
1052
|
-
n2k$$2 = l2.head.fields[0];
|
|
1053
|
-
t1$$9 = l1.tail;
|
|
1054
|
-
t2$$9 = l2.tail;
|
|
1055
|
-
} else {
|
|
1056
|
-
$target$$115 = 9;
|
|
1057
|
-
n1k$$5 = l1.head.fields[0];
|
|
1058
|
-
n1l = l1.head.fields[1];
|
|
1059
|
-
n1r$$2 = l1.head.fields[2];
|
|
1060
|
-
t1$$12 = l1.tail;
|
|
1061
|
-
}
|
|
1062
|
-
} else {
|
|
1063
|
-
$target$$115 = 10;
|
|
1064
|
-
n2k$$4 = l2.head.fields[0];
|
|
1065
|
-
t2$$11 = l2.tail;
|
|
1066
|
-
}
|
|
1067
|
-
} else if (l2.head.tag === 1) {
|
|
1068
|
-
if (l2.head.fields[1].tag === 0) {
|
|
1069
|
-
if (l1.head.tag === 2) {
|
|
1070
|
-
$target$$115 = 5;
|
|
1071
|
-
n1k$$1 = l1.head.fields[0];
|
|
1072
|
-
n2k$$1 = l2.head.fields[0];
|
|
1073
|
-
n2r = l2.head.fields[2];
|
|
1074
|
-
t1$$8 = l1.tail;
|
|
1075
|
-
t2$$8 = l2.tail;
|
|
1076
|
-
} else if (l1.head.tag === 1) {
|
|
1077
|
-
if (l1.head.fields[1].tag === 0) {
|
|
1078
|
-
$target$$115 = 7;
|
|
1079
|
-
n1k$$3 = l1.head.fields[0];
|
|
1080
|
-
n1r$$1 = l1.head.fields[2];
|
|
1081
|
-
n2k$$3 = l2.head.fields[0];
|
|
1082
|
-
n2r$$1 = l2.head.fields[2];
|
|
1083
|
-
t1$$10 = l1.tail;
|
|
1084
|
-
t2$$10 = l2.tail;
|
|
1085
|
-
} else {
|
|
1086
|
-
$target$$115 = 9;
|
|
1087
|
-
n1k$$5 = l1.head.fields[0];
|
|
1088
|
-
n1l = l1.head.fields[1];
|
|
1089
|
-
n1r$$2 = l1.head.fields[2];
|
|
1090
|
-
t1$$12 = l1.tail;
|
|
1091
|
-
}
|
|
1092
|
-
} else {
|
|
1093
|
-
$target$$115 = 11;
|
|
1094
|
-
n2k$$5 = l2.head.fields[0];
|
|
1095
|
-
n2l = l2.head.fields[1];
|
|
1096
|
-
n2r$$2 = l2.head.fields[2];
|
|
1097
|
-
t2$$12 = l2.tail;
|
|
1098
|
-
}
|
|
1099
|
-
} else if (l1.head.tag === 2) {
|
|
1100
|
-
$target$$115 = 8;
|
|
1101
|
-
n1k$$4 = l1.head.fields[0];
|
|
1102
|
-
t1$$11 = l1.tail;
|
|
1103
|
-
} else if (l1.head.tag === 1) {
|
|
1104
|
-
$target$$115 = 9;
|
|
1105
|
-
n1k$$5 = l1.head.fields[0];
|
|
1106
|
-
n1l = l1.head.fields[1];
|
|
1107
|
-
n1r$$2 = l1.head.fields[2];
|
|
1108
|
-
t1$$12 = l1.tail;
|
|
1109
|
-
} else {
|
|
1110
|
-
$target$$115 = 11;
|
|
1111
|
-
n2k$$5 = l2.head.fields[0];
|
|
1112
|
-
n2l = l2.head.fields[1];
|
|
1113
|
-
n2r$$2 = l2.head.fields[2];
|
|
1114
|
-
t2$$12 = l2.tail;
|
|
1115
|
-
}
|
|
1116
|
-
} else if (l1.head.tag === 2) {
|
|
1117
|
-
$target$$115 = 8;
|
|
1118
|
-
n1k$$4 = l1.head.fields[0];
|
|
1119
|
-
t1$$11 = l1.tail;
|
|
1120
|
-
} else if (l1.head.tag === 1) {
|
|
1121
|
-
$target$$115 = 9;
|
|
1122
|
-
n1k$$5 = l1.head.fields[0];
|
|
1123
|
-
n1l = l1.head.fields[1];
|
|
1124
|
-
n1r$$2 = l1.head.fields[2];
|
|
1125
|
-
t1$$12 = l1.tail;
|
|
1126
|
-
} else {
|
|
1127
|
-
$target$$115 = 3;
|
|
1128
|
-
t1$$6 = l1.tail;
|
|
1129
|
-
t2$$6 = l2.tail;
|
|
1130
|
-
}
|
|
1131
|
-
} else {
|
|
1132
|
-
$target$$115 = 2;
|
|
1133
|
-
}
|
|
1134
|
-
} else if (l2.tail != null) {
|
|
1135
|
-
$target$$115 = 1;
|
|
1136
|
-
} else {
|
|
1137
|
-
$target$$115 = 0;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
switch ($target$$115) {
|
|
1141
|
-
case 0:
|
|
1142
|
-
{
|
|
1143
|
-
return 0;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
case 1:
|
|
1147
|
-
{
|
|
1148
|
-
return -1 | 0;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
case 2:
|
|
1152
|
-
{
|
|
1153
|
-
return 1;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
case 3:
|
|
1157
|
-
{
|
|
1158
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1159
|
-
$l1$$113 = t1$$6;
|
|
1160
|
-
$l2$$114 = t2$$6;
|
|
1161
|
-
continue SetTreeModule$$$compareStacks;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
case 4:
|
|
1165
|
-
{
|
|
1166
|
-
const c$$7 = comparer$$17.Compare(n1k, n2k) | 0;
|
|
1167
|
-
|
|
1168
|
-
if (c$$7 !== 0) {
|
|
1169
|
-
return c$$7 | 0;
|
|
1170
|
-
} else {
|
|
1171
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1172
|
-
$l1$$113 = t1$$7;
|
|
1173
|
-
$l2$$114 = t2$$7;
|
|
1174
|
-
continue SetTreeModule$$$compareStacks;
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
case 5:
|
|
1179
|
-
{
|
|
1180
|
-
const c$$8 = comparer$$17.Compare(n1k$$1, n2k$$1) | 0;
|
|
1181
|
-
|
|
1182
|
-
if (c$$8 !== 0) {
|
|
1183
|
-
return c$$8 | 0;
|
|
1184
|
-
} else {
|
|
1185
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1186
|
-
$l1$$113 = new List(new SetTree$00601(0, "SetEmpty"), t1$$8);
|
|
1187
|
-
$l2$$114 = new List(n2r, t2$$8);
|
|
1188
|
-
continue SetTreeModule$$$compareStacks;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
case 6:
|
|
1193
|
-
{
|
|
1194
|
-
const c$$9 = comparer$$17.Compare(n1k$$2, n2k$$2) | 0;
|
|
1195
|
-
|
|
1196
|
-
if (c$$9 !== 0) {
|
|
1197
|
-
return c$$9 | 0;
|
|
1198
|
-
} else {
|
|
1199
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1200
|
-
$l1$$113 = new List(n1r, t1$$9);
|
|
1201
|
-
$l2$$114 = new List(emp, t2$$9);
|
|
1202
|
-
continue SetTreeModule$$$compareStacks;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
case 7:
|
|
1207
|
-
{
|
|
1208
|
-
const c$$10 = comparer$$17.Compare(n1k$$3, n2k$$3) | 0;
|
|
1209
|
-
|
|
1210
|
-
if (c$$10 !== 0) {
|
|
1211
|
-
return c$$10 | 0;
|
|
1212
|
-
} else {
|
|
1213
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1214
|
-
$l1$$113 = new List(n1r$$1, t1$$10);
|
|
1215
|
-
$l2$$114 = new List(n2r$$1, t2$$10);
|
|
1216
|
-
continue SetTreeModule$$$compareStacks;
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
case 8:
|
|
1221
|
-
{
|
|
1222
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1223
|
-
$l1$$113 = new List(new SetTree$00601(0, "SetEmpty"), new List(SetTreeModule$$$SetOne(n1k$$4), t1$$11));
|
|
1224
|
-
$l2$$114 = l2;
|
|
1225
|
-
continue SetTreeModule$$$compareStacks;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
case 9:
|
|
1229
|
-
{
|
|
1230
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1231
|
-
$l1$$113 = new List(n1l, new List(SetTreeModule$$$SetNode(n1k$$5, new SetTree$00601(0, "SetEmpty"), n1r$$2, 0), t1$$12));
|
|
1232
|
-
$l2$$114 = l2;
|
|
1233
|
-
continue SetTreeModule$$$compareStacks;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
case 10:
|
|
1237
|
-
{
|
|
1238
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1239
|
-
$l1$$113 = l1;
|
|
1240
|
-
$l2$$114 = new List(new SetTree$00601(0, "SetEmpty"), new List(SetTreeModule$$$SetOne(n2k$$4), t2$$11));
|
|
1241
|
-
continue SetTreeModule$$$compareStacks;
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
case 11:
|
|
1245
|
-
{
|
|
1246
|
-
$comparer$$17$$112 = comparer$$17;
|
|
1247
|
-
$l1$$113 = l1;
|
|
1248
|
-
$l2$$114 = new List(n2l, new List(SetTreeModule$$$SetNode(n2k$$5, new SetTree$00601(0, "SetEmpty"), n2r$$2, 0), t2$$12));
|
|
1249
|
-
continue SetTreeModule$$$compareStacks;
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
break;
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
export function SetTreeModule$$$compare(comparer$$18, s1, s2) {
|
|
1257
|
-
if (s1.tag === 0) {
|
|
1258
|
-
if (s2.tag === 0) {
|
|
1259
|
-
return 0;
|
|
1260
|
-
} else {
|
|
1261
|
-
return -1 | 0;
|
|
1262
|
-
}
|
|
1263
|
-
} else if (s2.tag === 0) {
|
|
1264
|
-
return 1;
|
|
1265
|
-
} else {
|
|
1266
|
-
return SetTreeModule$$$compareStacks(comparer$$18, new List(s1, new List()), new List(s2, new List())) | 0;
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
export function SetTreeModule$$$choose(s$$17) {
|
|
1270
|
-
return SetTreeModule$$$minimumElement(s$$17);
|
|
1271
|
-
}
|
|
1272
|
-
export function SetTreeModule$$$loop($m$$8$$120, $acc$$10$$121) {
|
|
1273
|
-
SetTreeModule$$$loop: while (true) {
|
|
1274
|
-
const m$$8 = $m$$8$$120,
|
|
1275
|
-
acc$$10 = $acc$$10$$121;
|
|
1276
|
-
|
|
1277
|
-
switch (m$$8.tag) {
|
|
1278
|
-
case 2:
|
|
1279
|
-
{
|
|
1280
|
-
return new List(m$$8.fields[0], acc$$10);
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
case 0:
|
|
1284
|
-
{
|
|
1285
|
-
return acc$$10;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
default:
|
|
1289
|
-
{
|
|
1290
|
-
$m$$8$$120 = m$$8.fields[1];
|
|
1291
|
-
$acc$$10$$121 = new List(m$$8.fields[0], SetTreeModule$$$loop(m$$8.fields[2], acc$$10));
|
|
1292
|
-
continue SetTreeModule$$$loop;
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
break;
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
export function SetTreeModule$$$toList(s$$18) {
|
|
1300
|
-
return SetTreeModule$$$loop(s$$18, new List());
|
|
1301
|
-
}
|
|
1302
|
-
export function SetTreeModule$$$copyToArray(s$$19, arr, i$$2) {
|
|
1303
|
-
let j = i$$2 | 0;
|
|
1304
|
-
SetTreeModule$$$iter(function (x$$8) {
|
|
1305
|
-
arr[j] = x$$8;
|
|
1306
|
-
j = j + 1;
|
|
1307
|
-
}, s$$19);
|
|
1308
|
-
}
|
|
1309
|
-
export function SetTreeModule$$$mkFromEnumerator($comparer$$19$$126, $acc$$11$$127, $e$$128) {
|
|
1310
|
-
SetTreeModule$$$mkFromEnumerator: while (true) {
|
|
1311
|
-
const comparer$$19 = $comparer$$19$$126,
|
|
1312
|
-
acc$$11 = $acc$$11$$127,
|
|
1313
|
-
e = $e$$128;
|
|
1314
|
-
|
|
1315
|
-
if (e.MoveNext()) {
|
|
1316
|
-
$comparer$$19$$126 = comparer$$19;
|
|
1317
|
-
$acc$$11$$127 = SetTreeModule$$$add(comparer$$19, e.Current, acc$$11);
|
|
1318
|
-
$e$$128 = e;
|
|
1319
|
-
continue SetTreeModule$$$mkFromEnumerator;
|
|
1320
|
-
} else {
|
|
1321
|
-
return acc$$11;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
break;
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
export function SetTreeModule$$$ofSeq(comparer$$20, c$$11) {
|
|
1328
|
-
const ie = getEnumerator(c$$11);
|
|
1329
|
-
|
|
1330
|
-
try {
|
|
1331
|
-
return SetTreeModule$$$mkFromEnumerator(comparer$$20, new SetTree$00601(0, "SetEmpty"), ie);
|
|
1332
|
-
} finally {
|
|
1333
|
-
if (isDisposable(ie)) {
|
|
1334
|
-
ie.Dispose();
|
|
1335
|
-
} else {
|
|
1336
|
-
void null;
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
export function SetTreeModule$$$ofArray(comparer$$21, arr$$1) {
|
|
1341
|
-
let acc$$12 = new SetTree$00601(0, "SetEmpty");
|
|
1342
|
-
|
|
1343
|
-
for (let i$$3 = 0; i$$3 <= arr$$1.length - 1; i$$3++) {
|
|
1344
|
-
acc$$12 = SetTreeModule$$$add(comparer$$21, arr$$1[i$$3], acc$$12);
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
return acc$$12;
|
|
1348
|
-
}
|
|
1349
|
-
export const FSharpSet = declare(function Set_Set(comparer$$22, tree) {
|
|
1350
|
-
const $this$$2 = this;
|
|
1351
|
-
$this$$2.comparer = comparer$$22;
|
|
1352
|
-
$this$$2.tree = tree;
|
|
1353
|
-
void null;
|
|
1354
|
-
});
|
|
1355
|
-
export function FSharpSet$reflection($gen$$133) {
|
|
1356
|
-
return class_type("Set.FSharpSet", [$gen$$133], FSharpSet);
|
|
1357
|
-
}
|
|
1358
|
-
export function FSharpSet$$$$002Ector$$2528C5CB(comparer$$22, tree) {
|
|
1359
|
-
return this instanceof FSharpSet ? FSharpSet.call(this, comparer$$22, tree) : new FSharpSet(comparer$$22, tree);
|
|
1360
|
-
}
|
|
1361
|
-
export function FSharpSet$$get_Comparer(__$$4) {
|
|
1362
|
-
return __$$4.comparer;
|
|
1363
|
-
}
|
|
1364
|
-
export function FSharpSet$$get_Tree(__$$5) {
|
|
1365
|
-
return __$$5.tree;
|
|
1366
|
-
}
|
|
1367
|
-
export function FSharpSet$$Add$$2B595(s$$20, x$$9) {
|
|
1368
|
-
return FSharpSet$$$$002Ector$$2528C5CB(FSharpSet$$get_Comparer(s$$20), SetTreeModule$$$add(FSharpSet$$get_Comparer(s$$20), x$$9, FSharpSet$$get_Tree(s$$20)));
|
|
1369
|
-
}
|
|
1370
|
-
export function FSharpSet$$Remove$$2B595(s$$21, x$$10) {
|
|
1371
|
-
return FSharpSet$$$$002Ector$$2528C5CB(FSharpSet$$get_Comparer(s$$21), SetTreeModule$$$remove(FSharpSet$$get_Comparer(s$$21), x$$10, FSharpSet$$get_Tree(s$$21)));
|
|
1372
|
-
}
|
|
1373
|
-
export function FSharpSet$$get_Count(s$$22) {
|
|
1374
|
-
return SetTreeModule$$$count(FSharpSet$$get_Tree(s$$22));
|
|
1375
|
-
}
|
|
1376
|
-
export function FSharpSet$$Contains$$2B595(s$$23, x$$11) {
|
|
1377
|
-
return SetTreeModule$$$mem(FSharpSet$$get_Comparer(s$$23), x$$11, FSharpSet$$get_Tree(s$$23));
|
|
1378
|
-
}
|
|
1379
|
-
export function FSharpSet$$Iterate$$5028453F(s$$24, x$$12) {
|
|
1380
|
-
SetTreeModule$$$iter(x$$12, FSharpSet$$get_Tree(s$$24));
|
|
1381
|
-
}
|
|
1382
|
-
export function FSharpSet$$Fold(s$$25, f$$10, z) {
|
|
1383
|
-
return SetTreeModule$$$fold(function (x$$13, z$$1) {
|
|
1384
|
-
return f$$10(z$$1, x$$13);
|
|
1385
|
-
}, z, FSharpSet$$get_Tree(s$$25));
|
|
1386
|
-
}
|
|
1387
|
-
export function FSharpSet$$get_IsEmpty(s$$26) {
|
|
1388
|
-
return SetTreeModule$$$isEmpty(FSharpSet$$get_Tree(s$$26));
|
|
1389
|
-
}
|
|
1390
|
-
export function FSharpSet$$Partition$$Z1D55A0D7(s$$27, f$$11) {
|
|
1391
|
-
const matchValue$$10 = FSharpSet$$get_Tree(s$$27);
|
|
1392
|
-
|
|
1393
|
-
if (matchValue$$10.tag === 0) {
|
|
1394
|
-
return [s$$27, s$$27];
|
|
1395
|
-
} else {
|
|
1396
|
-
const patternInput$$6 = SetTreeModule$$$partition(FSharpSet$$get_Comparer(s$$27), f$$11, FSharpSet$$get_Tree(s$$27));
|
|
1397
|
-
return [FSharpSet$$$$002Ector$$2528C5CB(FSharpSet$$get_Comparer(s$$27), patternInput$$6[0]), FSharpSet$$$$002Ector$$2528C5CB(FSharpSet$$get_Comparer(s$$27), patternInput$$6[1])];
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
export function FSharpSet$$Filter$$Z1D55A0D7(s$$28, f$$12) {
|
|
1401
|
-
const matchValue$$11 = FSharpSet$$get_Tree(s$$28);
|
|
1402
|
-
|
|
1403
|
-
if (matchValue$$11.tag === 0) {
|
|
1404
|
-
return s$$28;
|
|
1405
|
-
} else {
|
|
1406
|
-
return FSharpSet$$$$002Ector$$2528C5CB(FSharpSet$$get_Comparer(s$$28), SetTreeModule$$$filter(FSharpSet$$get_Comparer(s$$28), f$$12, FSharpSet$$get_Tree(s$$28)));
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
export function FSharpSet$$Map$$7597B8F7(s$$29, f$$13, comparer$$23) {
|
|
1410
|
-
return FSharpSet$$$$002Ector$$2528C5CB(comparer$$23, SetTreeModule$$$fold(function (acc$$13, k$$33) {
|
|
1411
|
-
return SetTreeModule$$$add(comparer$$23, f$$13(k$$33), acc$$13);
|
|
1412
|
-
}, new SetTree$00601(0, "SetEmpty"), FSharpSet$$get_Tree(s$$29)));
|
|
1413
|
-
}
|
|
1414
|
-
export function FSharpSet$$Exists$$Z1D55A0D7(s$$30, f$$14) {
|
|
1415
|
-
return SetTreeModule$$$exists(f$$14, FSharpSet$$get_Tree(s$$30));
|
|
1416
|
-
}
|
|
1417
|
-
export function FSharpSet$$ForAll$$Z1D55A0D7(s$$31, f$$15) {
|
|
1418
|
-
return SetTreeModule$$$forall(f$$15, FSharpSet$$get_Tree(s$$31));
|
|
1419
|
-
}
|
|
1420
|
-
export function FSharpSet$$$op_Subtraction(a$$4, b$$5) {
|
|
1421
|
-
const matchValue$$12 = FSharpSet$$get_Tree(a$$4);
|
|
1422
|
-
|
|
1423
|
-
if (matchValue$$12.tag === 0) {
|
|
1424
|
-
return a$$4;
|
|
1425
|
-
} else {
|
|
1426
|
-
const matchValue$$13 = FSharpSet$$get_Tree(b$$5);
|
|
1427
|
-
|
|
1428
|
-
if (matchValue$$13.tag === 0) {
|
|
1429
|
-
return a$$4;
|
|
1430
|
-
} else {
|
|
1431
|
-
return FSharpSet$$$$002Ector$$2528C5CB(FSharpSet$$get_Comparer(a$$4), SetTreeModule$$$diff(FSharpSet$$get_Comparer(a$$4), FSharpSet$$get_Tree(a$$4), FSharpSet$$get_Tree(b$$5)));
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
export function FSharpSet$$$op_Addition(a$$5, b$$6) {
|
|
1436
|
-
const matchValue$$14 = FSharpSet$$get_Tree(b$$6);
|
|
1437
|
-
|
|
1438
|
-
if (matchValue$$14.tag === 0) {
|
|
1439
|
-
return a$$5;
|
|
1440
|
-
} else {
|
|
1441
|
-
const matchValue$$15 = FSharpSet$$get_Tree(a$$5);
|
|
1442
|
-
|
|
1443
|
-
if (matchValue$$15.tag === 0) {
|
|
1444
|
-
return b$$6;
|
|
1445
|
-
} else {
|
|
1446
|
-
return FSharpSet$$$$002Ector$$2528C5CB(FSharpSet$$get_Comparer(a$$5), SetTreeModule$$$union(FSharpSet$$get_Comparer(a$$5), FSharpSet$$get_Tree(a$$5), FSharpSet$$get_Tree(b$$6)));
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
}
|
|
1450
|
-
export function FSharpSet$$$Intersection$$Z3BE9BFE0(a$$6, b$$7) {
|
|
1451
|
-
const matchValue$$16 = FSharpSet$$get_Tree(b$$7);
|
|
1452
|
-
|
|
1453
|
-
if (matchValue$$16.tag === 0) {
|
|
1454
|
-
return b$$7;
|
|
1455
|
-
} else {
|
|
1456
|
-
const matchValue$$17 = FSharpSet$$get_Tree(a$$6);
|
|
1457
|
-
|
|
1458
|
-
if (matchValue$$17.tag === 0) {
|
|
1459
|
-
return a$$6;
|
|
1460
|
-
} else {
|
|
1461
|
-
return FSharpSet$$$$002Ector$$2528C5CB(FSharpSet$$get_Comparer(a$$6), SetTreeModule$$$intersection(FSharpSet$$get_Comparer(a$$6), FSharpSet$$get_Tree(a$$6), FSharpSet$$get_Tree(b$$7)));
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
export function FSharpSet$$$IntersectionMany$$Z15B59630(sets) {
|
|
1466
|
-
return reduce(FSharpSet$$$Intersection$$Z3BE9BFE0, sets);
|
|
1467
|
-
}
|
|
1468
|
-
export function FSharpSet$$$Equality$$Z3BE9BFE0(a$$7, b$$8) {
|
|
1469
|
-
return SetTreeModule$$$compare(FSharpSet$$get_Comparer(a$$7), FSharpSet$$get_Tree(a$$7), FSharpSet$$get_Tree(b$$8)) === 0;
|
|
1470
|
-
}
|
|
1471
|
-
export function FSharpSet$$$Compare$$Z3BE9BFE0(a$$8, b$$9) {
|
|
1472
|
-
return SetTreeModule$$$compare(FSharpSet$$get_Comparer(a$$8), FSharpSet$$get_Tree(a$$8), FSharpSet$$get_Tree(b$$9));
|
|
1473
|
-
}
|
|
1474
|
-
export function FSharpSet$$get_Choose(x$$14) {
|
|
1475
|
-
return SetTreeModule$$$choose(FSharpSet$$get_Tree(x$$14));
|
|
1476
|
-
}
|
|
1477
|
-
export function FSharpSet$$get_MinimumElement(x$$15) {
|
|
1478
|
-
return SetTreeModule$$$minimumElement(FSharpSet$$get_Tree(x$$15));
|
|
1479
|
-
}
|
|
1480
|
-
export function FSharpSet$$get_MaximumElement(x$$16) {
|
|
1481
|
-
return SetTreeModule$$$maximumElement(FSharpSet$$get_Tree(x$$16));
|
|
1482
|
-
}
|
|
1483
|
-
export function FSharpSet$$IsSubsetOf$$6A20B1FF(x$$17, y) {
|
|
1484
|
-
return SetTreeModule$$$subset(FSharpSet$$get_Comparer(x$$17), FSharpSet$$get_Tree(x$$17), FSharpSet$$get_Tree(y));
|
|
1485
|
-
}
|
|
1486
|
-
export function FSharpSet$$IsSupersetOf$$6A20B1FF(x$$18, y$$1) {
|
|
1487
|
-
return SetTreeModule$$$subset(FSharpSet$$get_Comparer(x$$18), FSharpSet$$get_Tree(y$$1), FSharpSet$$get_Tree(x$$18));
|
|
1488
|
-
}
|
|
1489
|
-
export function FSharpSet$$IsProperSubsetOf$$6A20B1FF(x$$19, y$$2) {
|
|
1490
|
-
return SetTreeModule$$$psubset(FSharpSet$$get_Comparer(x$$19), FSharpSet$$get_Tree(x$$19), FSharpSet$$get_Tree(y$$2));
|
|
1491
|
-
}
|
|
1492
|
-
export function FSharpSet$$IsProperSupersetOf$$6A20B1FF(x$$20, y$$3) {
|
|
1493
|
-
return SetTreeModule$$$psubset(FSharpSet$$get_Comparer(x$$20), FSharpSet$$get_Tree(y$$3), FSharpSet$$get_Tree(x$$20));
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
FSharpSet.prototype.toString = function () {
|
|
1497
|
-
var strings;
|
|
1498
|
-
const this$ = this;
|
|
1499
|
-
return "set [" + (strings = map$$1(function (x$$21) {
|
|
1500
|
-
let copyOfStruct = x$$21;
|
|
1501
|
-
return String(copyOfStruct);
|
|
1502
|
-
}, this$), join("; ", strings)) + "]";
|
|
1503
|
-
};
|
|
1504
|
-
|
|
1505
|
-
FSharpSet.prototype.GetHashCode = function () {
|
|
1506
|
-
const this$$$1 = this;
|
|
1507
|
-
let res = 0;
|
|
1508
|
-
const e$$1 = SetTreeModule$$$mkIEnumerator(FSharpSet$$get_Tree(this$$$1));
|
|
1509
|
-
|
|
1510
|
-
while (e$$1.MoveNext()) {
|
|
1511
|
-
const x$$22 = res | 0;
|
|
1512
|
-
const y$$4 = structuralHash(e$$1.Current) | 0;
|
|
1513
|
-
res = (x$$22 << 1) + y$$4 + 631;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
return Math.abs(res) | 0;
|
|
1517
|
-
};
|
|
1518
|
-
|
|
1519
|
-
FSharpSet.prototype.Equals = function (that) {
|
|
1520
|
-
const this$$$2 = this;
|
|
1521
|
-
return SetTreeModule$$$compare(FSharpSet$$get_Comparer(this$$$2), FSharpSet$$get_Tree(this$$$2), FSharpSet$$get_Tree(that)) === 0;
|
|
1522
|
-
};
|
|
1523
|
-
|
|
1524
|
-
FSharpSet.prototype.CompareTo = function (that$$1) {
|
|
1525
|
-
const this$$$3 = this;
|
|
1526
|
-
return SetTreeModule$$$compare(FSharpSet$$get_Comparer(this$$$3), FSharpSet$$get_Tree(this$$$3), FSharpSet$$get_Tree(that$$1)) | 0;
|
|
1527
|
-
};
|
|
1528
|
-
|
|
1529
|
-
FSharpSet.prototype[Symbol.iterator] = function () {
|
|
1530
|
-
const s$$32 = this;
|
|
1531
|
-
return toIterator(SetTreeModule$$$mkIEnumerator(FSharpSet$$get_Tree(s$$32)));
|
|
1532
|
-
};
|
|
1533
|
-
|
|
1534
|
-
export function isEmpty(s$$33) {
|
|
1535
|
-
return FSharpSet$$get_IsEmpty(s$$33);
|
|
1536
|
-
}
|
|
1537
|
-
export function contains(x$$23, s$$34) {
|
|
1538
|
-
return FSharpSet$$Contains$$2B595(s$$34, x$$23);
|
|
1539
|
-
}
|
|
1540
|
-
export function add(x$$24, s$$35) {
|
|
1541
|
-
return FSharpSet$$Add$$2B595(s$$35, x$$24);
|
|
1542
|
-
}
|
|
1543
|
-
export function singleton(x$$25, comparer$$24) {
|
|
1544
|
-
return FSharpSet$$$$002Ector$$2528C5CB(comparer$$24, new SetTree$00601(2, "SetOne", x$$25));
|
|
1545
|
-
}
|
|
1546
|
-
export function remove(x$$26, s$$36) {
|
|
1547
|
-
return FSharpSet$$Remove$$2B595(s$$36, x$$26);
|
|
1548
|
-
}
|
|
1549
|
-
export function union(s1$$2, s2$$2) {
|
|
1550
|
-
return FSharpSet$$$op_Addition(s1$$2, s2$$2);
|
|
1551
|
-
}
|
|
1552
|
-
export function unionMany(sets$$1, comparer$$25) {
|
|
1553
|
-
return fold$$1(FSharpSet$$$op_Addition, FSharpSet$$$$002Ector$$2528C5CB(comparer$$25, new SetTree$00601(0, "SetEmpty")), sets$$1);
|
|
1554
|
-
}
|
|
1555
|
-
export function intersect(s1$$3, s2$$3) {
|
|
1556
|
-
return FSharpSet$$$Intersection$$Z3BE9BFE0(s1$$3, s2$$3);
|
|
1557
|
-
}
|
|
1558
|
-
export function intersectMany(sets$$2) {
|
|
1559
|
-
return FSharpSet$$$IntersectionMany$$Z15B59630(sets$$2);
|
|
1560
|
-
}
|
|
1561
|
-
export function iterate(f$$16, s$$37) {
|
|
1562
|
-
FSharpSet$$Iterate$$5028453F(s$$37, f$$16);
|
|
1563
|
-
}
|
|
1564
|
-
export function empty(comparer$$26) {
|
|
1565
|
-
return FSharpSet$$$$002Ector$$2528C5CB(comparer$$26, new SetTree$00601(0, "SetEmpty"));
|
|
1566
|
-
}
|
|
1567
|
-
export function forAll(f$$17, s$$38) {
|
|
1568
|
-
return FSharpSet$$ForAll$$Z1D55A0D7(s$$38, f$$17);
|
|
1569
|
-
}
|
|
1570
|
-
export function exists(f$$18, s$$39) {
|
|
1571
|
-
return FSharpSet$$Exists$$Z1D55A0D7(s$$39, f$$18);
|
|
1572
|
-
}
|
|
1573
|
-
export function filter(f$$19, s$$40) {
|
|
1574
|
-
return FSharpSet$$Filter$$Z1D55A0D7(s$$40, f$$19);
|
|
1575
|
-
}
|
|
1576
|
-
export function partition(f$$20, s$$41) {
|
|
1577
|
-
return FSharpSet$$Partition$$Z1D55A0D7(s$$41, f$$20);
|
|
1578
|
-
}
|
|
1579
|
-
export function fold(f$$21, z$$2, s$$42) {
|
|
1580
|
-
return SetTreeModule$$$fold(f$$21, z$$2, FSharpSet$$get_Tree(s$$42));
|
|
1581
|
-
}
|
|
1582
|
-
export function foldBack(f$$22, s$$43, z$$3) {
|
|
1583
|
-
return SetTreeModule$$$foldBack(f$$22, FSharpSet$$get_Tree(s$$43), z$$3);
|
|
1584
|
-
}
|
|
1585
|
-
export function map(f$$23, s$$44, comparer$$27) {
|
|
1586
|
-
return FSharpSet$$Map$$7597B8F7(s$$44, f$$23, comparer$$27);
|
|
1587
|
-
}
|
|
1588
|
-
export function count(s$$45) {
|
|
1589
|
-
return FSharpSet$$get_Count(s$$45);
|
|
1590
|
-
}
|
|
1591
|
-
export function minimumElement(s$$46) {
|
|
1592
|
-
return FSharpSet$$get_MinimumElement(s$$46);
|
|
1593
|
-
}
|
|
1594
|
-
export function maximumElement(s$$47) {
|
|
1595
|
-
return FSharpSet$$get_MaximumElement(s$$47);
|
|
1596
|
-
}
|
|
1597
|
-
export function ofList(li, comparer$$28) {
|
|
1598
|
-
return FSharpSet$$$$002Ector$$2528C5CB(comparer$$28, SetTreeModule$$$ofSeq(comparer$$28, li));
|
|
1599
|
-
}
|
|
1600
|
-
export function ofArray(arr$$2, comparer$$29) {
|
|
1601
|
-
return FSharpSet$$$$002Ector$$2528C5CB(comparer$$29, SetTreeModule$$$ofArray(comparer$$29, arr$$2));
|
|
1602
|
-
}
|
|
1603
|
-
export function toList(s$$48) {
|
|
1604
|
-
return SetTreeModule$$$toList(FSharpSet$$get_Tree(s$$48));
|
|
1605
|
-
}
|
|
1606
|
-
export function toArray(s$$49, cons) {
|
|
1607
|
-
const n$$3 = count(s$$49) | 0;
|
|
1608
|
-
const res$$1 = new cons(n$$3);
|
|
1609
|
-
SetTreeModule$$$copyToArray(FSharpSet$$get_Tree(s$$49), res$$1, 0);
|
|
1610
|
-
return res$$1;
|
|
1611
|
-
}
|
|
1612
|
-
export function toSeq(s$$50) {
|
|
1613
|
-
return SetTreeModule$$$toSeq(FSharpSet$$get_Tree(s$$50));
|
|
1614
|
-
}
|
|
1615
|
-
export function ofSeq(elements, comparer$$30) {
|
|
1616
|
-
return FSharpSet$$$$002Ector$$2528C5CB(comparer$$30, SetTreeModule$$$ofSeq(comparer$$30, elements));
|
|
1617
|
-
}
|
|
1618
|
-
export function difference(x$$28, y$$6) {
|
|
1619
|
-
return FSharpSet$$$op_Subtraction(x$$28, y$$6);
|
|
1620
|
-
}
|
|
1621
|
-
export function isSubset(x$$29, y$$7) {
|
|
1622
|
-
return FSharpSet$$IsSubsetOf$$6A20B1FF(x$$29, y$$7);
|
|
1623
|
-
}
|
|
1624
|
-
export function isSuperset(x$$30, y$$8) {
|
|
1625
|
-
return FSharpSet$$IsSupersetOf$$6A20B1FF(x$$30, y$$8);
|
|
1626
|
-
}
|
|
1627
|
-
export function isProperSubset(x$$31, y$$9) {
|
|
1628
|
-
return FSharpSet$$IsProperSubsetOf$$6A20B1FF(x$$31, y$$9);
|
|
1629
|
-
}
|
|
1630
|
-
export function isProperSuperset(x$$32, y$$10) {
|
|
1631
|
-
return FSharpSet$$IsProperSupersetOf$$6A20B1FF(x$$32, y$$10);
|
|
1632
|
-
}
|
|
1633
|
-
export function minElement(s$$51) {
|
|
1634
|
-
return FSharpSet$$get_MinimumElement(s$$51);
|
|
1635
|
-
}
|
|
1636
|
-
export function maxElement(s$$52) {
|
|
1637
|
-
return FSharpSet$$get_MaximumElement(s$$52);
|
|
1638
|
-
}
|
|
1639
|
-
export function createMutable(source, comparer$$31) {
|
|
1640
|
-
const set = MutableSet$002400601$0024$0024$0024$0024002Ector$0024$0024Z6150332D(source, comparer$$31);
|
|
1641
|
-
return set;
|
|
1642
|
-
}
|
|
1643
|
-
export function distinct(xs, comparer$$32) {
|
|
1644
|
-
return delay(function () {
|
|
1645
|
-
const set$$1 = MutableSet$002400601$0024$0024$0024$0024002Ector$0024$0024Z6150332D(empty$$1(), comparer$$32);
|
|
1646
|
-
return collect(function (x$$33) {
|
|
1647
|
-
return MutableSet$002400601$0024$0024Add$0024$00242B595(set$$1, x$$33) ? singleton$$1(x$$33) : empty$$1();
|
|
1648
|
-
}, xs);
|
|
1649
|
-
});
|
|
1650
|
-
}
|
|
1651
|
-
export function distinctBy(projection, xs$$1, comparer$$33) {
|
|
1652
|
-
return delay(function () {
|
|
1653
|
-
const set$$2 = MutableSet$002400601$0024$0024$0024$0024002Ector$0024$0024Z6150332D(empty$$1(), comparer$$33);
|
|
1654
|
-
return collect(function (x$$34) {
|
|
1655
|
-
return MutableSet$002400601$0024$0024Add$0024$00242B595(set$$2, projection(x$$34)) ? singleton$$1(x$$34) : empty$$1();
|
|
1656
|
-
}, xs$$1);
|
|
1657
|
-
});
|
|
1658
|
-
}
|
|
1659
|
-
export function unionWith(s1$$4, s2$$4) {
|
|
1660
|
-
return fold$$1(function folder(acc$$14, x$$35) {
|
|
1661
|
-
return acc$$14.add(x$$35);
|
|
1662
|
-
}, s1$$4, s2$$4);
|
|
1663
|
-
}
|
|
1664
|
-
export function intersectWith(s1$$5, s2$$5, comparer$$34) {
|
|
1665
|
-
const s2$$6 = ofSeq(s2$$5, comparer$$34);
|
|
1666
|
-
iterate$$1(function (x$$36) {
|
|
1667
|
-
if (!FSharpSet$$Contains$$2B595(s2$$6, x$$36)) {
|
|
1668
|
-
const value = s1$$5.delete(x$$36);
|
|
1669
|
-
void value;
|
|
1670
|
-
} else {
|
|
1671
|
-
void null;
|
|
1672
|
-
}
|
|
1673
|
-
}, s1$$5);
|
|
1674
|
-
}
|
|
1675
|
-
export function exceptWith(s1$$6, s2$$7) {
|
|
1676
|
-
iterate$$1(function (x$$37) {
|
|
1677
|
-
const value$$1 = s1$$6.delete(x$$37);
|
|
1678
|
-
void value$$1;
|
|
1679
|
-
}, s2$$7);
|
|
1680
|
-
}
|
|
1681
|
-
export function isSubsetOf(s1$$7, s2$$8, comparer$$35) {
|
|
1682
|
-
return isSubset(ofSeq(s1$$7, comparer$$35), ofSeq(s2$$8, comparer$$35));
|
|
1683
|
-
}
|
|
1684
|
-
export function isSupersetOf(s1$$8, s2$$9, comparer$$36) {
|
|
1685
|
-
return isSuperset(ofSeq(s1$$8, comparer$$36), ofSeq(s2$$9, comparer$$36));
|
|
1686
|
-
}
|
|
1687
|
-
export function isProperSubsetOf(s1$$9, s2$$10, comparer$$37) {
|
|
1688
|
-
return isProperSubset(ofSeq(s1$$9, comparer$$37), ofSeq(s2$$10, comparer$$37));
|
|
1689
|
-
}
|
|
1690
|
-
export function isProperSupersetOf(s1$$10, s2$$11, comparer$$38) {
|
|
1691
|
-
return isProperSuperset(ofSeq(s1$$10, comparer$$38), ofSeq(s2$$11, comparer$$38));
|
|
1692
|
-
}
|