@fable-org/fable-library-js 1.4.0 → 1.4.2
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/Array.js +10 -10
- package/BigInt.js +4 -3
- package/CHANGELOG.md +13 -1
- package/Choice.js +2 -2
- package/Date.js +4 -4
- package/List.js +31 -31
- package/Map.js +10 -10
- package/MutableMap.js +1 -1
- package/MutableSet.js +1 -1
- package/Random.js +2 -2
- package/Range.js +4 -4
- package/Result.js +2 -2
- package/Seq.js +47 -48
- package/Set.js +3 -3
- package/System.Text.js +1 -1
- package/TimeSpan.js +2 -2
- package/package.json +1 -1
package/Array.js
CHANGED
|
@@ -41,7 +41,7 @@ export function last(array) {
|
|
|
41
41
|
}
|
|
42
42
|
export function tryLast(array) {
|
|
43
43
|
if (array.length === 0) {
|
|
44
|
-
return
|
|
44
|
+
return undefined;
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
47
|
return some(item_2(array.length - 1, array));
|
|
@@ -202,7 +202,7 @@ export function indexOf(array, item_1, start, count, eq) {
|
|
|
202
202
|
return loop(start_1) | 0;
|
|
203
203
|
}
|
|
204
204
|
export function contains(value, array, eq) {
|
|
205
|
-
return indexOf(array, value,
|
|
205
|
+
return indexOf(array, value, undefined, undefined, eq) >= 0;
|
|
206
206
|
}
|
|
207
207
|
export function empty(cons) {
|
|
208
208
|
return Helpers_allocateArrayFromCons(cons, 0);
|
|
@@ -353,7 +353,7 @@ export function insertRangeInPlace(index, range, array) {
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
export function removeInPlace(item_1, array, eq) {
|
|
356
|
-
const i = indexOf(array, item_1,
|
|
356
|
+
const i = indexOf(array, item_1, undefined, undefined, eq) | 0;
|
|
357
357
|
if (i > -1) {
|
|
358
358
|
array.splice(i, 1);
|
|
359
359
|
return true;
|
|
@@ -421,7 +421,7 @@ export function tryFindIndex(predicate, array) {
|
|
|
421
421
|
return matchValue;
|
|
422
422
|
}
|
|
423
423
|
else {
|
|
424
|
-
return
|
|
424
|
+
return undefined;
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
export function pick(chooser, array) {
|
|
@@ -451,7 +451,7 @@ export function tryPick(chooser, array) {
|
|
|
451
451
|
loop: while (true) {
|
|
452
452
|
const i = i_mut;
|
|
453
453
|
if (i >= array.length) {
|
|
454
|
-
return
|
|
454
|
+
return undefined;
|
|
455
455
|
}
|
|
456
456
|
else {
|
|
457
457
|
const matchValue = chooser(item_2(i, array));
|
|
@@ -492,7 +492,7 @@ export function tryFindBack(predicate, array) {
|
|
|
492
492
|
loop: while (true) {
|
|
493
493
|
const i = i_mut;
|
|
494
494
|
if (i < 0) {
|
|
495
|
-
return
|
|
495
|
+
return undefined;
|
|
496
496
|
}
|
|
497
497
|
else if (predicate(item_2(i, array))) {
|
|
498
498
|
return some(item_2(i, array));
|
|
@@ -550,7 +550,7 @@ export function tryFindIndexBack(predicate, array) {
|
|
|
550
550
|
loop: while (true) {
|
|
551
551
|
const i = i_mut;
|
|
552
552
|
if (i < 0) {
|
|
553
|
-
return
|
|
553
|
+
return undefined;
|
|
554
554
|
}
|
|
555
555
|
else if (predicate(item_2(i, array))) {
|
|
556
556
|
return i;
|
|
@@ -887,7 +887,7 @@ export function tryExactlyOne(array) {
|
|
|
887
887
|
return some(item_2(0, array));
|
|
888
888
|
}
|
|
889
889
|
else {
|
|
890
|
-
return
|
|
890
|
+
return undefined;
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
export function head(array) {
|
|
@@ -900,7 +900,7 @@ export function head(array) {
|
|
|
900
900
|
}
|
|
901
901
|
export function tryHead(array) {
|
|
902
902
|
if (array.length === 0) {
|
|
903
|
-
return
|
|
903
|
+
return undefined;
|
|
904
904
|
}
|
|
905
905
|
else {
|
|
906
906
|
return some(item_2(0, array));
|
|
@@ -930,7 +930,7 @@ export function setItem(array, index, value) {
|
|
|
930
930
|
}
|
|
931
931
|
export function tryItem(index, array) {
|
|
932
932
|
if ((index < 0) ? true : (index >= array.length)) {
|
|
933
|
-
return
|
|
933
|
+
return undefined;
|
|
934
934
|
}
|
|
935
935
|
else {
|
|
936
936
|
return some(array[index]);
|
package/BigInt.js
CHANGED
|
@@ -111,10 +111,11 @@ export function toFloat16(x) { return Number(x); }
|
|
|
111
111
|
export function toFloat32(x) { return Number(x); }
|
|
112
112
|
export function toFloat64(x) { return Number(x); }
|
|
113
113
|
export function toDecimal(x) {
|
|
114
|
-
const low = Number(BigInt.asUintN(32, x));
|
|
115
|
-
const mid = Number(BigInt.asUintN(32, x >> 32n));
|
|
116
|
-
const high = Number(BigInt.asUintN(32, x >> 64n));
|
|
117
114
|
const isNegative = x < zero;
|
|
115
|
+
const bits = abs(x);
|
|
116
|
+
const low = Number(BigInt.asUintN(32, bits));
|
|
117
|
+
const mid = Number(BigInt.asUintN(32, bits >> 32n));
|
|
118
|
+
const high = Number(BigInt.asUintN(32, bits >> 64n));
|
|
118
119
|
const scale = 0;
|
|
119
120
|
return fromParts(low, mid, high, isNegative, scale);
|
|
120
121
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
-
## 1.4.
|
|
10
|
+
## 1.4.2 - 2024-06-13
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
* [JS/TS] Fixed BigInt.ToDecimal with negative values (#3500) (by @ncave)
|
|
15
|
+
|
|
16
|
+
## 1.4.1 - 2024-06-13
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
* [JS/TS] Fixed DateTime.MinValue, DateTime.MaxValue (#3836) (by @ncave)
|
|
21
|
+
|
|
22
|
+
## 1.4.0 - 2024-03-20
|
|
11
23
|
|
|
12
24
|
### Added
|
|
13
25
|
|
package/Choice.js
CHANGED
|
@@ -171,7 +171,7 @@ export function Choice_tryValueIfChoice1Of2(x) {
|
|
|
171
171
|
return some(x.fields[0]);
|
|
172
172
|
}
|
|
173
173
|
else {
|
|
174
|
-
return
|
|
174
|
+
return undefined;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
export function Choice_tryValueIfChoice2Of2(x) {
|
|
@@ -179,6 +179,6 @@ export function Choice_tryValueIfChoice2Of2(x) {
|
|
|
179
179
|
return some(x.fields[0]);
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
|
-
return
|
|
182
|
+
return undefined;
|
|
183
183
|
}
|
|
184
184
|
}
|
package/Date.js
CHANGED
|
@@ -82,10 +82,10 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
82
82
|
cursorPos += tokenLength;
|
|
83
83
|
switch (tokenLength) {
|
|
84
84
|
case 1:
|
|
85
|
-
result += localizedDate
|
|
85
|
+
result += day(localizedDate);
|
|
86
86
|
break;
|
|
87
87
|
case 2:
|
|
88
|
-
result += padWithZeros(localizedDate
|
|
88
|
+
result += padWithZeros(day(localizedDate), 2);
|
|
89
89
|
break;
|
|
90
90
|
case 3:
|
|
91
91
|
result += shortDays[dayOfWeek(localizedDate)];
|
|
@@ -469,11 +469,11 @@ export function getTicks(date) {
|
|
|
469
469
|
}
|
|
470
470
|
export function minValue() {
|
|
471
471
|
// This is "0001-01-01T00:00:00.000Z", actual JS min value is -8640000000000000
|
|
472
|
-
return DateTime(-62135596800000,
|
|
472
|
+
return DateTime(-62135596800000, 1 /* DateKind.UTC */);
|
|
473
473
|
}
|
|
474
474
|
export function maxValue() {
|
|
475
475
|
// This is "9999-12-31T23:59:59.999Z", actual JS max value is 8640000000000000
|
|
476
|
-
return DateTime(253402300799999,
|
|
476
|
+
return DateTime(253402300799999, 1 /* DateKind.UTC */);
|
|
477
477
|
}
|
|
478
478
|
export function parseRaw(input) {
|
|
479
479
|
function fail() {
|
package/List.js
CHANGED
|
@@ -178,7 +178,7 @@ export function ListEnumerator$1_$ctor_3002E699(xs) {
|
|
|
178
178
|
return new ListEnumerator$1(xs);
|
|
179
179
|
}
|
|
180
180
|
export function FSharpList_get_Empty() {
|
|
181
|
-
return new FSharpList(defaultOf(),
|
|
181
|
+
return new FSharpList(defaultOf(), undefined);
|
|
182
182
|
}
|
|
183
183
|
export function FSharpList_Cons_305B8EAC(x, xs) {
|
|
184
184
|
return new FSharpList(x, xs);
|
|
@@ -268,7 +268,7 @@ export function head(xs) {
|
|
|
268
268
|
}
|
|
269
269
|
export function tryHead(xs) {
|
|
270
270
|
if (FSharpList__get_IsEmpty(xs)) {
|
|
271
|
-
return
|
|
271
|
+
return undefined;
|
|
272
272
|
}
|
|
273
273
|
else {
|
|
274
274
|
return some(FSharpList__get_Head(xs));
|
|
@@ -281,7 +281,7 @@ export function tryLast(xs_mut) {
|
|
|
281
281
|
tryLast: while (true) {
|
|
282
282
|
const xs = xs_mut;
|
|
283
283
|
if (FSharpList__get_IsEmpty(xs)) {
|
|
284
|
-
return
|
|
284
|
+
return undefined;
|
|
285
285
|
}
|
|
286
286
|
else {
|
|
287
287
|
const t = FSharpList__get_Tail(xs);
|
|
@@ -411,7 +411,7 @@ export function unfold(gen, state) {
|
|
|
411
411
|
const matchValue = gen(acc);
|
|
412
412
|
if (matchValue != null) {
|
|
413
413
|
acc_mut = value_1(matchValue)[1];
|
|
414
|
-
node_mut = ((t = (new FSharpList(value_1(matchValue)[0],
|
|
414
|
+
node_mut = ((t = (new FSharpList(value_1(matchValue)[0], undefined)), (node.tail = t, t)));
|
|
415
415
|
continue loop;
|
|
416
416
|
}
|
|
417
417
|
else {
|
|
@@ -429,12 +429,12 @@ export function unfold(gen, state) {
|
|
|
429
429
|
export function iterate(action, xs) {
|
|
430
430
|
fold((unitVar, x) => {
|
|
431
431
|
action(x);
|
|
432
|
-
},
|
|
432
|
+
}, undefined, xs);
|
|
433
433
|
}
|
|
434
434
|
export function iterate2(action, xs, ys) {
|
|
435
435
|
fold2((unitVar, x, y) => {
|
|
436
436
|
action(x, y);
|
|
437
|
-
},
|
|
437
|
+
}, undefined, xs, ys);
|
|
438
438
|
}
|
|
439
439
|
export function iterateIndexed(action, xs) {
|
|
440
440
|
fold((i, x) => {
|
|
@@ -476,7 +476,7 @@ export function ofSeq(xs) {
|
|
|
476
476
|
try {
|
|
477
477
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
478
478
|
const x = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
479
|
-
node = ((xs_3 = node, (t = (new FSharpList(x,
|
|
479
|
+
node = ((xs_3 = node, (t = (new FSharpList(x, undefined)), (xs_3.tail = t, t))));
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
finally {
|
|
@@ -493,7 +493,7 @@ export function concat(lists) {
|
|
|
493
493
|
let node = root;
|
|
494
494
|
const action = (xs) => {
|
|
495
495
|
node = fold((acc, x) => {
|
|
496
|
-
const t = new FSharpList(x,
|
|
496
|
+
const t = new FSharpList(x, undefined);
|
|
497
497
|
acc.tail = t;
|
|
498
498
|
return t;
|
|
499
499
|
}, node, xs);
|
|
@@ -525,14 +525,14 @@ export function scan(folder, state, xs) {
|
|
|
525
525
|
let xs_4, t_2;
|
|
526
526
|
const root = FSharpList_get_Empty();
|
|
527
527
|
let node;
|
|
528
|
-
const t = new FSharpList(state,
|
|
528
|
+
const t = new FSharpList(state, undefined);
|
|
529
529
|
root.tail = t;
|
|
530
530
|
node = t;
|
|
531
531
|
let acc = state;
|
|
532
532
|
let xs_3 = xs;
|
|
533
533
|
while (!FSharpList__get_IsEmpty(xs_3)) {
|
|
534
534
|
acc = folder(acc, FSharpList__get_Head(xs_3));
|
|
535
|
-
node = ((xs_4 = node, (t_2 = (new FSharpList(acc,
|
|
535
|
+
node = ((xs_4 = node, (t_2 = (new FSharpList(acc, undefined)), (xs_4.tail = t_2, t_2))));
|
|
536
536
|
xs_3 = FSharpList__get_Tail(xs_3);
|
|
537
537
|
}
|
|
538
538
|
const xs_6 = node;
|
|
@@ -554,7 +554,7 @@ export function collect(mapping, xs) {
|
|
|
554
554
|
while (!FSharpList__get_IsEmpty(ys)) {
|
|
555
555
|
let zs = mapping(FSharpList__get_Head(ys));
|
|
556
556
|
while (!FSharpList__get_IsEmpty(zs)) {
|
|
557
|
-
node = ((xs_1 = node, (t = (new FSharpList(FSharpList__get_Head(zs),
|
|
557
|
+
node = ((xs_1 = node, (t = (new FSharpList(FSharpList__get_Head(zs), undefined)), (xs_1.tail = t, t))));
|
|
558
558
|
zs = FSharpList__get_Tail(zs);
|
|
559
559
|
}
|
|
560
560
|
ys = FSharpList__get_Tail(ys);
|
|
@@ -567,7 +567,7 @@ export function collect(mapping, xs) {
|
|
|
567
567
|
export function mapIndexed(mapping, xs) {
|
|
568
568
|
const root = FSharpList_get_Empty();
|
|
569
569
|
const node = foldIndexed((i, acc, x) => {
|
|
570
|
-
const t = new FSharpList(mapping(i, x),
|
|
570
|
+
const t = new FSharpList(mapping(i, x), undefined);
|
|
571
571
|
acc.tail = t;
|
|
572
572
|
return t;
|
|
573
573
|
}, root, xs);
|
|
@@ -578,7 +578,7 @@ export function mapIndexed(mapping, xs) {
|
|
|
578
578
|
export function map(mapping, xs) {
|
|
579
579
|
const root = FSharpList_get_Empty();
|
|
580
580
|
const node = fold((acc, x) => {
|
|
581
|
-
const t = new FSharpList(mapping(x),
|
|
581
|
+
const t = new FSharpList(mapping(x), undefined);
|
|
582
582
|
acc.tail = t;
|
|
583
583
|
return t;
|
|
584
584
|
}, root, xs);
|
|
@@ -592,7 +592,7 @@ export function indexed(xs) {
|
|
|
592
592
|
export function map2(mapping, xs, ys) {
|
|
593
593
|
const root = FSharpList_get_Empty();
|
|
594
594
|
const node = fold2((acc, x, y) => {
|
|
595
|
-
const t = new FSharpList(mapping(x, y),
|
|
595
|
+
const t = new FSharpList(mapping(x, y), undefined);
|
|
596
596
|
acc.tail = t;
|
|
597
597
|
return t;
|
|
598
598
|
}, root, xs, ys);
|
|
@@ -610,7 +610,7 @@ export function mapIndexed2(mapping, xs, ys) {
|
|
|
610
610
|
}
|
|
611
611
|
else {
|
|
612
612
|
i_mut = (i + 1);
|
|
613
|
-
acc_mut = ((t = (new FSharpList(mapping(i, FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1)),
|
|
613
|
+
acc_mut = ((t = (new FSharpList(mapping(i, FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1)), undefined)), (acc.tail = t, t)));
|
|
614
614
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
615
615
|
ys_1_mut = FSharpList__get_Tail(ys_1);
|
|
616
616
|
continue loop;
|
|
@@ -633,7 +633,7 @@ export function map3(mapping, xs, ys, zs) {
|
|
|
633
633
|
return acc;
|
|
634
634
|
}
|
|
635
635
|
else {
|
|
636
|
-
acc_mut = ((t = (new FSharpList(mapping(FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1), FSharpList__get_Head(zs_1)),
|
|
636
|
+
acc_mut = ((t = (new FSharpList(mapping(FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1), FSharpList__get_Head(zs_1)), undefined)), (acc.tail = t, t)));
|
|
637
637
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
638
638
|
ys_1_mut = FSharpList__get_Tail(ys_1);
|
|
639
639
|
zs_1_mut = FSharpList__get_Tail(zs_1);
|
|
@@ -653,7 +653,7 @@ export function mapFold(mapping, state, xs) {
|
|
|
653
653
|
const patternInput_1 = fold((tupledArg, x) => {
|
|
654
654
|
let t;
|
|
655
655
|
const patternInput = mapping(tupledArg[1], x);
|
|
656
|
-
return [(t = (new FSharpList(patternInput[0],
|
|
656
|
+
return [(t = (new FSharpList(patternInput[0], undefined)), (tupledArg[0].tail = t, t)), patternInput[1]];
|
|
657
657
|
}, [root, state], xs);
|
|
658
658
|
const t_2 = FSharpList_get_Empty();
|
|
659
659
|
patternInput_1[0].tail = t_2;
|
|
@@ -667,7 +667,7 @@ export function tryPick(f, xs) {
|
|
|
667
667
|
loop: while (true) {
|
|
668
668
|
const xs_1 = xs_1_mut;
|
|
669
669
|
if (FSharpList__get_IsEmpty(xs_1)) {
|
|
670
|
-
return
|
|
670
|
+
return undefined;
|
|
671
671
|
}
|
|
672
672
|
else {
|
|
673
673
|
const matchValue = f(FSharpList__get_Head(xs_1));
|
|
@@ -694,7 +694,7 @@ export function pick(f, xs) {
|
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
696
|
export function tryFind(f, xs) {
|
|
697
|
-
return tryPick((x) => (f(x) ? some(x) :
|
|
697
|
+
return tryPick((x) => (f(x) ? some(x) : undefined), xs);
|
|
698
698
|
}
|
|
699
699
|
export function find(f, xs) {
|
|
700
700
|
const matchValue = tryFind(f, xs);
|
|
@@ -722,7 +722,7 @@ export function tryFindIndex(f, xs) {
|
|
|
722
722
|
loop: while (true) {
|
|
723
723
|
const i = i_mut, xs_1 = xs_1_mut;
|
|
724
724
|
if (FSharpList__get_IsEmpty(xs_1)) {
|
|
725
|
-
return
|
|
725
|
+
return undefined;
|
|
726
726
|
}
|
|
727
727
|
else if (f(FSharpList__get_Head(xs_1))) {
|
|
728
728
|
return i;
|
|
@@ -765,7 +765,7 @@ export function tryItem(n, xs) {
|
|
|
765
765
|
loop: while (true) {
|
|
766
766
|
const i = i_mut, xs_1 = xs_1_mut;
|
|
767
767
|
if (FSharpList__get_IsEmpty(xs_1)) {
|
|
768
|
-
return
|
|
768
|
+
return undefined;
|
|
769
769
|
}
|
|
770
770
|
else if (i === n) {
|
|
771
771
|
return some(FSharpList__get_Head(xs_1));
|
|
@@ -787,7 +787,7 @@ export function filter(f, xs) {
|
|
|
787
787
|
const root = FSharpList_get_Empty();
|
|
788
788
|
const node = fold((acc, x) => {
|
|
789
789
|
if (f(x)) {
|
|
790
|
-
const t = new FSharpList(x,
|
|
790
|
+
const t = new FSharpList(x, undefined);
|
|
791
791
|
acc.tail = t;
|
|
792
792
|
return t;
|
|
793
793
|
}
|
|
@@ -808,10 +808,10 @@ export function partition(f, xs) {
|
|
|
808
808
|
const lacc = tupledArg[0];
|
|
809
809
|
const racc = tupledArg[1];
|
|
810
810
|
if (f(x)) {
|
|
811
|
-
return [(t = (new FSharpList(x,
|
|
811
|
+
return [(t = (new FSharpList(x, undefined)), (lacc.tail = t, t)), racc];
|
|
812
812
|
}
|
|
813
813
|
else {
|
|
814
|
-
return [lacc, (t_2 = (new FSharpList(x,
|
|
814
|
+
return [lacc, (t_2 = (new FSharpList(x, undefined)), (racc.tail = t_2, t_2))];
|
|
815
815
|
}
|
|
816
816
|
}, [root1, root2], xs);
|
|
817
817
|
const t_4 = FSharpList_get_Empty();
|
|
@@ -828,7 +828,7 @@ export function choose(f, xs) {
|
|
|
828
828
|
return acc;
|
|
829
829
|
}
|
|
830
830
|
else {
|
|
831
|
-
const t = new FSharpList(value_1(matchValue),
|
|
831
|
+
const t = new FSharpList(value_1(matchValue), undefined);
|
|
832
832
|
acc.tail = t;
|
|
833
833
|
return t;
|
|
834
834
|
}
|
|
@@ -845,7 +845,7 @@ export function initialize(n, f) {
|
|
|
845
845
|
const root = FSharpList_get_Empty();
|
|
846
846
|
let node = root;
|
|
847
847
|
for (let i = 0; i <= (n - 1); i++) {
|
|
848
|
-
node = ((xs = node, (t = (new FSharpList(f(i),
|
|
848
|
+
node = ((xs = node, (t = (new FSharpList(f(i), undefined)), (xs.tail = t, t))));
|
|
849
849
|
}
|
|
850
850
|
const xs_2 = node;
|
|
851
851
|
const t_2 = FSharpList_get_Empty();
|
|
@@ -994,7 +994,7 @@ export function allPairs(xs, ys) {
|
|
|
994
994
|
iterate((x) => {
|
|
995
995
|
iterate((y) => {
|
|
996
996
|
let xs_1, t;
|
|
997
|
-
node = ((xs_1 = node, (t = (new FSharpList([x, y],
|
|
997
|
+
node = ((xs_1 = node, (t = (new FSharpList([x, y], undefined)), (xs_1.tail = t, t))));
|
|
998
998
|
}, ys);
|
|
999
999
|
}, xs);
|
|
1000
1000
|
const xs_3 = node;
|
|
@@ -1052,7 +1052,7 @@ export function take(count, xs) {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
else {
|
|
1054
1054
|
i_mut = (i - 1);
|
|
1055
|
-
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1),
|
|
1055
|
+
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1), undefined)), (acc.tail = t, t)));
|
|
1056
1056
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
1057
1057
|
continue loop;
|
|
1058
1058
|
}
|
|
@@ -1077,7 +1077,7 @@ export function takeWhile(predicate, xs) {
|
|
|
1077
1077
|
return acc;
|
|
1078
1078
|
}
|
|
1079
1079
|
else {
|
|
1080
|
-
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1),
|
|
1080
|
+
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1), undefined)), (acc.tail = t, t)));
|
|
1081
1081
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
1082
1082
|
continue loop;
|
|
1083
1083
|
}
|
|
@@ -1103,7 +1103,7 @@ export function truncate(count, xs) {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
else {
|
|
1105
1105
|
i_mut = (i - 1);
|
|
1106
|
-
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1),
|
|
1106
|
+
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1), undefined)), (acc.tail = t, t)));
|
|
1107
1107
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
1108
1108
|
continue loop;
|
|
1109
1109
|
}
|
|
@@ -1156,7 +1156,7 @@ export function tryExactlyOne(xs) {
|
|
|
1156
1156
|
return some(FSharpList__get_Head(xs));
|
|
1157
1157
|
}
|
|
1158
1158
|
else {
|
|
1159
|
-
return
|
|
1159
|
+
return undefined;
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
export function where(predicate, xs) {
|
package/Map.js
CHANGED
|
@@ -48,7 +48,7 @@ export function MapTreeNode$2__get_Height(_) {
|
|
|
48
48
|
return _.h;
|
|
49
49
|
}
|
|
50
50
|
export function MapTreeModule_empty() {
|
|
51
|
-
return
|
|
51
|
+
return undefined;
|
|
52
52
|
}
|
|
53
53
|
export function MapTreeModule_sizeAux(acc_mut, m_mut) {
|
|
54
54
|
MapTreeModule_sizeAux: while (true) {
|
|
@@ -217,11 +217,11 @@ export function MapTreeModule_tryFind(comparer_mut, k_mut, m_mut) {
|
|
|
217
217
|
continue MapTreeModule_tryFind;
|
|
218
218
|
}
|
|
219
219
|
else {
|
|
220
|
-
return
|
|
220
|
+
return undefined;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
else {
|
|
224
|
-
return
|
|
224
|
+
return undefined;
|
|
225
225
|
}
|
|
226
226
|
break;
|
|
227
227
|
}
|
|
@@ -398,7 +398,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
|
|
|
398
398
|
else {
|
|
399
399
|
const c_1 = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;
|
|
400
400
|
if (c_1 < 0) {
|
|
401
|
-
const matchValue_2 = u(
|
|
401
|
+
const matchValue_2 = u(undefined);
|
|
402
402
|
if (matchValue_2 != null) {
|
|
403
403
|
return MapTreeNode$2_$ctor_Z39DE9543(k, value_1(matchValue_2), MapTreeModule_empty(), m, 2);
|
|
404
404
|
}
|
|
@@ -416,7 +416,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
|
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
else {
|
|
419
|
-
const matchValue_4 = u(
|
|
419
|
+
const matchValue_4 = u(undefined);
|
|
420
420
|
if (matchValue_4 != null) {
|
|
421
421
|
return MapTreeNode$2_$ctor_Z39DE9543(k, value_1(matchValue_4), m, MapTreeModule_empty(), 2);
|
|
422
422
|
}
|
|
@@ -427,7 +427,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
|
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
else {
|
|
430
|
-
const matchValue = u(
|
|
430
|
+
const matchValue = u(undefined);
|
|
431
431
|
if (matchValue != null) {
|
|
432
432
|
return MapTreeLeaf$2_$ctor_5BDDA1(k, value_1(matchValue));
|
|
433
433
|
}
|
|
@@ -521,7 +521,7 @@ export function MapTreeModule_tryPickOpt(f_mut, m_mut) {
|
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
523
|
else {
|
|
524
|
-
return
|
|
524
|
+
return undefined;
|
|
525
525
|
}
|
|
526
526
|
break;
|
|
527
527
|
}
|
|
@@ -928,7 +928,7 @@ export function MapTreeModule_toSeq(s) {
|
|
|
928
928
|
return [en_1["System.Collections.Generic.IEnumerator`1.get_Current"](), en_1];
|
|
929
929
|
}
|
|
930
930
|
else {
|
|
931
|
-
return
|
|
931
|
+
return undefined;
|
|
932
932
|
}
|
|
933
933
|
}, MapTreeModule_mkIEnumerator(s));
|
|
934
934
|
}
|
|
@@ -1346,7 +1346,7 @@ export function findKey(predicate, table) {
|
|
|
1346
1346
|
return some(k);
|
|
1347
1347
|
}
|
|
1348
1348
|
else {
|
|
1349
|
-
return
|
|
1349
|
+
return undefined;
|
|
1350
1350
|
}
|
|
1351
1351
|
}, table);
|
|
1352
1352
|
}
|
|
@@ -1357,7 +1357,7 @@ export function tryFindKey(predicate, table) {
|
|
|
1357
1357
|
return some(k);
|
|
1358
1358
|
}
|
|
1359
1359
|
else {
|
|
1360
|
-
return
|
|
1360
|
+
return undefined;
|
|
1361
1361
|
}
|
|
1362
1362
|
}, table);
|
|
1363
1363
|
}
|
package/MutableMap.js
CHANGED
|
@@ -221,7 +221,7 @@ export function Dictionary__TryFind_2B595(this$, k) {
|
|
|
221
221
|
case 0:
|
|
222
222
|
return getItemFromDict(this$.hashMap, matchValue[1])[matchValue[2]];
|
|
223
223
|
default:
|
|
224
|
-
return
|
|
224
|
+
return undefined;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
export function Dictionary__get_Comparer(this$) {
|
package/MutableSet.js
CHANGED
package/Random.js
CHANGED
|
@@ -48,7 +48,7 @@ export class NonSeeded {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
export function NonSeeded_$reflection() {
|
|
51
|
-
return class_type("Random.NonSeeded",
|
|
51
|
+
return class_type("Random.NonSeeded", undefined, NonSeeded);
|
|
52
52
|
}
|
|
53
53
|
export function NonSeeded_$ctor() {
|
|
54
54
|
return new NonSeeded();
|
|
@@ -120,7 +120,7 @@ export class Seeded {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
export function Seeded_$reflection() {
|
|
123
|
-
return class_type("Random.Seeded",
|
|
123
|
+
return class_type("Random.Seeded", undefined, Seeded);
|
|
124
124
|
}
|
|
125
125
|
export function Seeded_$ctor_Z524259A4(seed) {
|
|
126
126
|
return new Seeded(seed);
|
package/Range.js
CHANGED
|
@@ -10,7 +10,7 @@ export function makeRangeStepFunction(step, stop, zero, add) {
|
|
|
10
10
|
const stepGreaterThanZero = stepComparedWithZero > 0;
|
|
11
11
|
return (x) => {
|
|
12
12
|
const comparedWithLast = compare(x, stop) | 0;
|
|
13
|
-
return ((stepGreaterThanZero && (comparedWithLast <= 0)) ? true : (!stepGreaterThanZero && (comparedWithLast >= 0))) ? [x, add(x, step)] :
|
|
13
|
+
return ((stepGreaterThanZero && (comparedWithLast <= 0)) ? true : (!stepGreaterThanZero && (comparedWithLast >= 0))) ? [x, add(x, step)] : undefined;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
export function integralRangeStep(start, step, stop, zero, add) {
|
|
@@ -33,13 +33,13 @@ export function rangeUInt64(start, step, stop) {
|
|
|
33
33
|
return integralRangeStep(start, step, stop, 0n, (x, y) => toUInt64(op_Addition(x, y)));
|
|
34
34
|
}
|
|
35
35
|
export function rangeChar(start, stop) {
|
|
36
|
-
const intStop = stop.charCodeAt(0) | 0;
|
|
36
|
+
const intStop = ~~stop.charCodeAt(0) | 0;
|
|
37
37
|
return delay(() => unfold((c) => {
|
|
38
38
|
if (c <= intStop) {
|
|
39
39
|
return [String.fromCharCode(c), c + 1];
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
return
|
|
42
|
+
return undefined;
|
|
43
43
|
}
|
|
44
|
-
}, start.charCodeAt(0)));
|
|
44
|
+
}, ~~start.charCodeAt(0)));
|
|
45
45
|
}
|
package/Result.js
CHANGED
|
@@ -152,7 +152,7 @@ export function Result_ToOption(result) {
|
|
|
152
152
|
return some(result.fields[0]);
|
|
153
153
|
}
|
|
154
154
|
else {
|
|
155
|
-
return
|
|
155
|
+
return undefined;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
export function Result_ToValueOption(result) {
|
|
@@ -160,6 +160,6 @@ export function Result_ToValueOption(result) {
|
|
|
160
160
|
return some(result.fields[0]);
|
|
161
161
|
}
|
|
162
162
|
else {
|
|
163
|
-
return
|
|
163
|
+
return undefined;
|
|
164
164
|
}
|
|
165
165
|
}
|
package/Seq.js
CHANGED
|
@@ -100,16 +100,15 @@ export function Enumerator_FromFunctions$1_$ctor_58C54629(current, next, dispose
|
|
|
100
100
|
}
|
|
101
101
|
export function Enumerator_cast(e) {
|
|
102
102
|
return Enumerator_FromFunctions$1_$ctor_58C54629(() => e["System.Collections.Generic.IEnumerator`1.get_Current"](), () => e["System.Collections.IEnumerator.MoveNext"](), () => {
|
|
103
|
-
|
|
104
|
-
disposeSafe(e_1);
|
|
103
|
+
disposeSafe(e);
|
|
105
104
|
});
|
|
106
105
|
}
|
|
107
106
|
export function Enumerator_concat(sources) {
|
|
108
|
-
let outerOpt =
|
|
109
|
-
let innerOpt =
|
|
107
|
+
let outerOpt = undefined;
|
|
108
|
+
let innerOpt = undefined;
|
|
110
109
|
let started = false;
|
|
111
110
|
let finished = false;
|
|
112
|
-
let curr =
|
|
111
|
+
let curr = undefined;
|
|
113
112
|
const finish = () => {
|
|
114
113
|
finished = true;
|
|
115
114
|
if (innerOpt != null) {
|
|
@@ -118,7 +117,7 @@ export function Enumerator_concat(sources) {
|
|
|
118
117
|
disposeSafe(inner);
|
|
119
118
|
}
|
|
120
119
|
finally {
|
|
121
|
-
innerOpt =
|
|
120
|
+
innerOpt = undefined;
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
if (outerOpt != null) {
|
|
@@ -127,7 +126,7 @@ export function Enumerator_concat(sources) {
|
|
|
127
126
|
disposeSafe(outer);
|
|
128
127
|
}
|
|
129
128
|
finally {
|
|
130
|
-
outerOpt =
|
|
129
|
+
outerOpt = undefined;
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
};
|
|
@@ -153,7 +152,7 @@ export function Enumerator_concat(sources) {
|
|
|
153
152
|
return false;
|
|
154
153
|
}
|
|
155
154
|
else {
|
|
156
|
-
let res =
|
|
155
|
+
let res = undefined;
|
|
157
156
|
while (res == null) {
|
|
158
157
|
const outerOpt_1 = outerOpt;
|
|
159
158
|
const innerOpt_1 = innerOpt;
|
|
@@ -169,7 +168,7 @@ export function Enumerator_concat(sources) {
|
|
|
169
168
|
disposeSafe(inner_1);
|
|
170
169
|
}
|
|
171
170
|
finally {
|
|
172
|
-
innerOpt =
|
|
171
|
+
innerOpt = undefined;
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
174
|
}
|
|
@@ -209,7 +208,7 @@ export function Enumerator_enumerateThenFinally(f, e) {
|
|
|
209
208
|
}
|
|
210
209
|
export function Enumerator_generateWhileSome(openf, compute, closef) {
|
|
211
210
|
let started = false;
|
|
212
|
-
let curr =
|
|
211
|
+
let curr = undefined;
|
|
213
212
|
let state = some(openf());
|
|
214
213
|
const dispose = () => {
|
|
215
214
|
if (state != null) {
|
|
@@ -218,7 +217,7 @@ export function Enumerator_generateWhileSome(openf, compute, closef) {
|
|
|
218
217
|
closef(x_1);
|
|
219
218
|
}
|
|
220
219
|
finally {
|
|
221
|
-
state =
|
|
220
|
+
state = undefined;
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
223
|
};
|
|
@@ -227,7 +226,7 @@ export function Enumerator_generateWhileSome(openf, compute, closef) {
|
|
|
227
226
|
dispose();
|
|
228
227
|
}
|
|
229
228
|
finally {
|
|
230
|
-
curr =
|
|
229
|
+
curr = undefined;
|
|
231
230
|
}
|
|
232
231
|
};
|
|
233
232
|
return Enumerator_FromFunctions$1_$ctor_58C54629(() => {
|
|
@@ -269,7 +268,7 @@ export function Enumerator_generateWhileSome(openf, compute, closef) {
|
|
|
269
268
|
}, dispose);
|
|
270
269
|
}
|
|
271
270
|
export function Enumerator_unfold(f, state) {
|
|
272
|
-
let curr =
|
|
271
|
+
let curr = undefined;
|
|
273
272
|
let acc = state;
|
|
274
273
|
return Enumerator_FromFunctions$1_$ctor_58C54629(() => {
|
|
275
274
|
if (curr != null) {
|
|
@@ -373,7 +372,7 @@ export function cast(xs) {
|
|
|
373
372
|
}
|
|
374
373
|
export function choose(chooser, xs) {
|
|
375
374
|
return generate(() => ofSeq(xs), (e) => {
|
|
376
|
-
let curr =
|
|
375
|
+
let curr = undefined;
|
|
377
376
|
while ((curr == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
378
377
|
curr = chooser(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
379
378
|
}
|
|
@@ -421,7 +420,7 @@ export function contains(value, xs, comparer) {
|
|
|
421
420
|
}
|
|
422
421
|
}
|
|
423
422
|
export function enumerateFromFunctions(create, moveNext, current) {
|
|
424
|
-
return generate(create, (x) => (moveNext(x) ? some(current(x)) :
|
|
423
|
+
return generate(create, (x) => (moveNext(x) ? some(current(x)) : undefined), (x_1) => {
|
|
425
424
|
const matchValue = x_1;
|
|
426
425
|
if (isDisposable(matchValue)) {
|
|
427
426
|
const id = matchValue;
|
|
@@ -461,7 +460,7 @@ export function enumerateUsing(resource, source) {
|
|
|
461
460
|
});
|
|
462
461
|
}
|
|
463
462
|
export function enumerateWhile(guard, xs) {
|
|
464
|
-
return concat(unfold((i) => (guard() ? [xs, i + 1] :
|
|
463
|
+
return concat(unfold((i) => (guard() ? [xs, i + 1] : undefined), 0));
|
|
465
464
|
}
|
|
466
465
|
export function filter(f, xs) {
|
|
467
466
|
return choose((x) => {
|
|
@@ -469,7 +468,7 @@ export function filter(f, xs) {
|
|
|
469
468
|
return some(x);
|
|
470
469
|
}
|
|
471
470
|
else {
|
|
472
|
-
return
|
|
471
|
+
return undefined;
|
|
473
472
|
}
|
|
474
473
|
}, xs);
|
|
475
474
|
}
|
|
@@ -530,10 +529,10 @@ export function tryExactlyOne(xs) {
|
|
|
530
529
|
try {
|
|
531
530
|
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
532
531
|
const v = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
533
|
-
return e["System.Collections.IEnumerator.MoveNext"]() ?
|
|
532
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? undefined : some(v);
|
|
534
533
|
}
|
|
535
534
|
else {
|
|
536
|
-
return
|
|
535
|
+
return undefined;
|
|
537
536
|
}
|
|
538
537
|
}
|
|
539
538
|
finally {
|
|
@@ -543,7 +542,7 @@ export function tryExactlyOne(xs) {
|
|
|
543
542
|
export function tryFind(predicate, xs) {
|
|
544
543
|
const e = ofSeq(xs);
|
|
545
544
|
try {
|
|
546
|
-
let res =
|
|
545
|
+
let res = undefined;
|
|
547
546
|
while ((res == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
548
547
|
const c = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
549
548
|
if (predicate(c)) {
|
|
@@ -593,7 +592,7 @@ export function tryFindIndex(predicate, xs) {
|
|
|
593
592
|
}
|
|
594
593
|
}
|
|
595
594
|
else {
|
|
596
|
-
return
|
|
595
|
+
return undefined;
|
|
597
596
|
}
|
|
598
597
|
break;
|
|
599
598
|
}
|
|
@@ -681,7 +680,7 @@ export function tryHead(xs) {
|
|
|
681
680
|
else {
|
|
682
681
|
const e = ofSeq(xs);
|
|
683
682
|
try {
|
|
684
|
-
return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) :
|
|
683
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
|
|
685
684
|
}
|
|
686
685
|
finally {
|
|
687
686
|
disposeSafe(e);
|
|
@@ -698,7 +697,7 @@ export function head(xs) {
|
|
|
698
697
|
}
|
|
699
698
|
}
|
|
700
699
|
export function initialize(count, f) {
|
|
701
|
-
return unfold((i) => ((i < count) ? [f(i), i + 1] :
|
|
700
|
+
return unfold((i) => ((i < count) ? [f(i), i + 1] : undefined), 0);
|
|
702
701
|
}
|
|
703
702
|
export function initializeInfinite(f) {
|
|
704
703
|
return initialize(2147483647, f);
|
|
@@ -735,7 +734,7 @@ export function tryItem(index, xs) {
|
|
|
735
734
|
loop: while (true) {
|
|
736
735
|
const index_1 = index_1_mut;
|
|
737
736
|
if (!e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
738
|
-
return
|
|
737
|
+
return undefined;
|
|
739
738
|
}
|
|
740
739
|
else if (index_1 === 0) {
|
|
741
740
|
return some(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
@@ -766,12 +765,12 @@ export function item(index, xs) {
|
|
|
766
765
|
export function iterate(action, xs) {
|
|
767
766
|
fold((unitVar, x) => {
|
|
768
767
|
action(x);
|
|
769
|
-
},
|
|
768
|
+
}, undefined, xs);
|
|
770
769
|
}
|
|
771
770
|
export function iterate2(action, xs, ys) {
|
|
772
771
|
fold2((unitVar, x, y) => {
|
|
773
772
|
action(x, y);
|
|
774
|
-
},
|
|
773
|
+
}, undefined, xs, ys);
|
|
775
774
|
}
|
|
776
775
|
export function iterateIndexed(action, xs) {
|
|
777
776
|
fold((i, x) => {
|
|
@@ -801,7 +800,7 @@ export function tryLast(xs) {
|
|
|
801
800
|
break;
|
|
802
801
|
}
|
|
803
802
|
};
|
|
804
|
-
return e["System.Collections.IEnumerator.MoveNext"]() ? some(loop(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) :
|
|
803
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? some(loop(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
|
|
805
804
|
}
|
|
806
805
|
finally {
|
|
807
806
|
disposeSafe(e);
|
|
@@ -839,12 +838,12 @@ export function length(xs) {
|
|
|
839
838
|
}
|
|
840
839
|
}
|
|
841
840
|
export function map(mapping, xs) {
|
|
842
|
-
return generate(() => ofSeq(xs), (e) => (e["System.Collections.IEnumerator.MoveNext"]() ? some(mapping(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) :
|
|
841
|
+
return generate(() => ofSeq(xs), (e) => (e["System.Collections.IEnumerator.MoveNext"]() ? some(mapping(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined), (e_1) => {
|
|
843
842
|
disposeSafe(e_1);
|
|
844
843
|
});
|
|
845
844
|
}
|
|
846
845
|
export function mapIndexed(mapping, xs) {
|
|
847
|
-
return generateIndexed(() => ofSeq(xs), (i, e) => (e["System.Collections.IEnumerator.MoveNext"]() ? some(mapping(i, e["System.Collections.Generic.IEnumerator`1.get_Current"]())) :
|
|
846
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => (e["System.Collections.IEnumerator.MoveNext"]() ? some(mapping(i, e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined), (e_1) => {
|
|
848
847
|
disposeSafe(e_1);
|
|
849
848
|
});
|
|
850
849
|
}
|
|
@@ -855,7 +854,7 @@ export function map2(mapping, xs, ys) {
|
|
|
855
854
|
return generate(() => [ofSeq(xs), ofSeq(ys)], (tupledArg) => {
|
|
856
855
|
const e1 = tupledArg[0];
|
|
857
856
|
const e2 = tupledArg[1];
|
|
858
|
-
return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) :
|
|
857
|
+
return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
|
|
859
858
|
}, (tupledArg_1) => {
|
|
860
859
|
try {
|
|
861
860
|
disposeSafe(tupledArg_1[0]);
|
|
@@ -869,7 +868,7 @@ export function mapIndexed2(mapping, xs, ys) {
|
|
|
869
868
|
return generateIndexed(() => [ofSeq(xs), ofSeq(ys)], (i, tupledArg) => {
|
|
870
869
|
const e1 = tupledArg[0];
|
|
871
870
|
const e2 = tupledArg[1];
|
|
872
|
-
return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(i, e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) :
|
|
871
|
+
return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(i, e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
|
|
873
872
|
}, (tupledArg_1) => {
|
|
874
873
|
try {
|
|
875
874
|
disposeSafe(tupledArg_1[0]);
|
|
@@ -884,7 +883,7 @@ export function map3(mapping, xs, ys, zs) {
|
|
|
884
883
|
const e1 = tupledArg[0];
|
|
885
884
|
const e2 = tupledArg[1];
|
|
886
885
|
const e3 = tupledArg[2];
|
|
887
|
-
return ((e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) && e3["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"](), e3["System.Collections.Generic.IEnumerator`1.get_Current"]())) :
|
|
886
|
+
return ((e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) && e3["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"](), e3["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
|
|
888
887
|
}, (tupledArg_1) => {
|
|
889
888
|
try {
|
|
890
889
|
disposeSafe(tupledArg_1[0]);
|
|
@@ -936,7 +935,7 @@ export function CachedSeq$1__Clear(_) {
|
|
|
936
935
|
export function cache(source) {
|
|
937
936
|
checkNonNull("source", source);
|
|
938
937
|
const prefix = [];
|
|
939
|
-
let enumeratorR =
|
|
938
|
+
let enumeratorR = undefined;
|
|
940
939
|
return CachedSeq$1_$ctor_Z7A8347D4(() => {
|
|
941
940
|
Operators_Lock(prefix, () => {
|
|
942
941
|
clear(prefix);
|
|
@@ -959,7 +958,7 @@ export function cache(source) {
|
|
|
959
958
|
break;
|
|
960
959
|
}
|
|
961
960
|
}
|
|
962
|
-
enumeratorR =
|
|
961
|
+
enumeratorR = undefined;
|
|
963
962
|
});
|
|
964
963
|
}, unfold((i_1) => Operators_Lock(prefix, () => {
|
|
965
964
|
if (i_1 < prefix.length) {
|
|
@@ -985,7 +984,7 @@ export function cache(source) {
|
|
|
985
984
|
}
|
|
986
985
|
else {
|
|
987
986
|
disposeSafe(enumerator);
|
|
988
|
-
enumeratorR = some(
|
|
987
|
+
enumeratorR = some(undefined);
|
|
989
988
|
}
|
|
990
989
|
}
|
|
991
990
|
}
|
|
@@ -993,7 +992,7 @@ export function cache(source) {
|
|
|
993
992
|
return [prefix[i_1], i_1 + 1];
|
|
994
993
|
}
|
|
995
994
|
else {
|
|
996
|
-
return
|
|
995
|
+
return undefined;
|
|
997
996
|
}
|
|
998
997
|
}
|
|
999
998
|
}), 0));
|
|
@@ -1013,7 +1012,7 @@ export function mapFoldBack(mapping, xs, state) {
|
|
|
1013
1012
|
export function tryPick(chooser, xs) {
|
|
1014
1013
|
const e = ofSeq(xs);
|
|
1015
1014
|
try {
|
|
1016
|
-
let res =
|
|
1015
|
+
let res = undefined;
|
|
1017
1016
|
while ((res == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1018
1017
|
res = chooser(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1019
1018
|
}
|
|
@@ -1129,19 +1128,19 @@ export function take(count, xs) {
|
|
|
1129
1128
|
}
|
|
1130
1129
|
}
|
|
1131
1130
|
else {
|
|
1132
|
-
return
|
|
1131
|
+
return undefined;
|
|
1133
1132
|
}
|
|
1134
1133
|
}, (e_1) => {
|
|
1135
1134
|
disposeSafe(e_1);
|
|
1136
1135
|
});
|
|
1137
1136
|
}
|
|
1138
1137
|
export function takeWhile(predicate, xs) {
|
|
1139
|
-
return generate(() => ofSeq(xs), (e) => ((e["System.Collections.IEnumerator.MoveNext"]() && predicate(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) :
|
|
1138
|
+
return generate(() => ofSeq(xs), (e) => ((e["System.Collections.IEnumerator.MoveNext"]() && predicate(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined), (e_1) => {
|
|
1140
1139
|
disposeSafe(e_1);
|
|
1141
1140
|
});
|
|
1142
1141
|
}
|
|
1143
1142
|
export function truncate(count, xs) {
|
|
1144
|
-
return generateIndexed(() => ofSeq(xs), (i, e) => (((i < count) && e["System.Collections.IEnumerator.MoveNext"]()) ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) :
|
|
1143
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => (((i < count) && e["System.Collections.IEnumerator.MoveNext"]()) ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined), (e_1) => {
|
|
1145
1144
|
disposeSafe(e_1);
|
|
1146
1145
|
});
|
|
1147
1146
|
}
|
|
@@ -1255,7 +1254,7 @@ export function insertAt(index, y, xs) {
|
|
|
1255
1254
|
if (!isDone) {
|
|
1256
1255
|
throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1257
1256
|
}
|
|
1258
|
-
return
|
|
1257
|
+
return undefined;
|
|
1259
1258
|
}
|
|
1260
1259
|
}, (e_1) => {
|
|
1261
1260
|
disposeSafe(e_1);
|
|
@@ -1279,11 +1278,11 @@ export function insertManyAt(index, ys, xs) {
|
|
|
1279
1278
|
}
|
|
1280
1279
|
else {
|
|
1281
1280
|
status = 1;
|
|
1282
|
-
inserted =
|
|
1281
|
+
inserted = undefined;
|
|
1283
1282
|
}
|
|
1284
1283
|
}
|
|
1285
1284
|
else {
|
|
1286
|
-
inserted =
|
|
1285
|
+
inserted = undefined;
|
|
1287
1286
|
}
|
|
1288
1287
|
if (inserted == null) {
|
|
1289
1288
|
if (e1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
@@ -1293,7 +1292,7 @@ export function insertManyAt(index, ys, xs) {
|
|
|
1293
1292
|
if (status < 1) {
|
|
1294
1293
|
throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1295
1294
|
}
|
|
1296
|
-
return
|
|
1295
|
+
return undefined;
|
|
1297
1296
|
}
|
|
1298
1297
|
}
|
|
1299
1298
|
else {
|
|
@@ -1315,13 +1314,13 @@ export function removeAt(index, xs) {
|
|
|
1315
1314
|
}
|
|
1316
1315
|
else if ((i === index) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1317
1316
|
isDone = true;
|
|
1318
|
-
return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) :
|
|
1317
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
|
|
1319
1318
|
}
|
|
1320
1319
|
else {
|
|
1321
1320
|
if (!isDone) {
|
|
1322
1321
|
throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1323
1322
|
}
|
|
1324
|
-
return
|
|
1323
|
+
return undefined;
|
|
1325
1324
|
}
|
|
1326
1325
|
}, (e_1) => {
|
|
1327
1326
|
disposeSafe(e_1);
|
|
@@ -1348,7 +1347,7 @@ export function removeManyAt(index, count, xs) {
|
|
|
1348
1347
|
}
|
|
1349
1348
|
}
|
|
1350
1349
|
}
|
|
1351
|
-
return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) :
|
|
1350
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
|
|
1352
1351
|
}
|
|
1353
1352
|
}, (e_1) => {
|
|
1354
1353
|
disposeSafe(e_1);
|
|
@@ -1371,7 +1370,7 @@ export function updateAt(index, y, xs) {
|
|
|
1371
1370
|
if (!isDone) {
|
|
1372
1371
|
throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1373
1372
|
}
|
|
1374
|
-
return
|
|
1373
|
+
return undefined;
|
|
1375
1374
|
}
|
|
1376
1375
|
}, (e_1) => {
|
|
1377
1376
|
disposeSafe(e_1);
|
package/Set.js
CHANGED
|
@@ -45,7 +45,7 @@ export function SetTreeNode$1__get_Height(_) {
|
|
|
45
45
|
return _.h;
|
|
46
46
|
}
|
|
47
47
|
export function SetTreeModule_empty() {
|
|
48
|
-
return
|
|
48
|
+
return undefined;
|
|
49
49
|
}
|
|
50
50
|
export function SetTreeModule_countAux(t_mut, acc_mut) {
|
|
51
51
|
SetTreeModule_countAux: while (true) {
|
|
@@ -688,7 +688,7 @@ export function SetTreeModule_minimumElementOpt(t) {
|
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
690
|
else {
|
|
691
|
-
return
|
|
691
|
+
return undefined;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
export function SetTreeModule_maximumElementAux(t_mut, n_mut) {
|
|
@@ -724,7 +724,7 @@ export function SetTreeModule_maximumElementOpt(t) {
|
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
726
|
else {
|
|
727
|
-
return
|
|
727
|
+
return undefined;
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
export function SetTreeModule_minimumElement(s) {
|
package/System.Text.js
CHANGED
|
@@ -15,7 +15,7 @@ export class StringBuilder {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
export function StringBuilder_$reflection() {
|
|
18
|
-
return class_type("System.Text.StringBuilder",
|
|
18
|
+
return class_type("System.Text.StringBuilder", undefined, StringBuilder);
|
|
19
19
|
}
|
|
20
20
|
export function StringBuilder_$ctor_Z18115A39(value, capacity) {
|
|
21
21
|
return new StringBuilder(value, capacity);
|
package/TimeSpan.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { comparePrimitives, padLeftAndRightWithZeros, padWithZeros } from "./Util.js";
|
|
2
|
-
import { toInt64 } from "./BigInt.js";
|
|
2
|
+
import { toInt64, fromFloat64 } from "./BigInt.js";
|
|
3
3
|
/**
|
|
4
4
|
* Calls:
|
|
5
5
|
* - `Math.ceil` if the `value` is **negative**
|
|
@@ -55,7 +55,7 @@ export function milliseconds(ts) {
|
|
|
55
55
|
return signedRound(ts % 1000);
|
|
56
56
|
}
|
|
57
57
|
export function ticks(ts) {
|
|
58
|
-
return toInt64(
|
|
58
|
+
return toInt64(fromFloat64(ts * 10000));
|
|
59
59
|
}
|
|
60
60
|
export function totalDays(ts) {
|
|
61
61
|
return ts / 86400000;
|
package/package.json
CHANGED