@fable-org/fable-library-js 2.10.0 → 2.12.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/Array.js +272 -167
- package/BigInt.js +18 -6
- package/CHANGELOG.md +42 -1
- package/Date.js +1 -1
- package/Decimal.js +16 -46
- package/Double.js +25 -10
- package/FSharp.Core.js +7 -1
- package/Global.js +1 -1
- package/Int32.js +10 -1
- package/List.js +226 -156
- package/Long.js +7 -2
- package/Map.js +46 -39
- package/MutableMap.js +76 -96
- package/MutableSet.js +58 -80
- package/NumberStyles.js +56 -0
- package/Numeric.js +10 -4
- package/Random.js +3 -4
- package/Range.js +4 -3
- package/RegExp.js +3 -2
- package/Seq.js +132 -64
- package/Seq2.js +4 -8
- package/Set.js +64 -57
- package/String.js +71 -23
- package/System.Collections.Generic.js +3 -2
- package/System.Text.js +2 -2
- package/System.js +5 -5
- package/TimeOnly.js +1 -1
- package/Types.js +25 -10
- package/Util.js +91 -48
- package/package.json +1 -1
package/System.js
CHANGED
|
@@ -239,16 +239,16 @@ export function ArgumentException_$ctor_Z60A2B367(message, paramName, innerExcep
|
|
|
239
239
|
return new ArgumentException(message, paramName, innerException);
|
|
240
240
|
}
|
|
241
241
|
export function ArgumentException_$ctor() {
|
|
242
|
-
return ArgumentException_$ctor_Z60A2B367(SR_Arg_ArgumentException,
|
|
242
|
+
return ArgumentException_$ctor_Z60A2B367(SR_Arg_ArgumentException, defaultOf(), defaultOf());
|
|
243
243
|
}
|
|
244
244
|
export function ArgumentException_$ctor_Z721C83C5(message) {
|
|
245
|
-
return ArgumentException_$ctor_Z60A2B367(message,
|
|
245
|
+
return ArgumentException_$ctor_Z60A2B367(message, defaultOf(), defaultOf());
|
|
246
246
|
}
|
|
247
247
|
export function ArgumentException_$ctor_Z384F8060(message, paramName) {
|
|
248
248
|
return ArgumentException_$ctor_Z60A2B367(message, paramName, defaultOf());
|
|
249
249
|
}
|
|
250
250
|
export function ArgumentException_$ctor_68CE3CA2(message, innerException) {
|
|
251
|
-
return ArgumentException_$ctor_Z60A2B367(message,
|
|
251
|
+
return ArgumentException_$ctor_Z60A2B367(message, defaultOf(), innerException);
|
|
252
252
|
}
|
|
253
253
|
export function ArgumentException__get_ParamName(_) {
|
|
254
254
|
return _.paramName;
|
|
@@ -268,7 +268,7 @@ export function ArgumentNullException_$ctor_Z721C83C5(paramName) {
|
|
|
268
268
|
return ArgumentNullException_$ctor_Z384F8060(paramName, SR_ArgumentNull_Generic);
|
|
269
269
|
}
|
|
270
270
|
export function ArgumentNullException_$ctor() {
|
|
271
|
-
return ArgumentNullException_$ctor_Z721C83C5(
|
|
271
|
+
return ArgumentNullException_$ctor_Z721C83C5(defaultOf());
|
|
272
272
|
}
|
|
273
273
|
export class ArgumentOutOfRangeException extends ArgumentException {
|
|
274
274
|
constructor(paramName, message) {
|
|
@@ -285,5 +285,5 @@ export function ArgumentOutOfRangeException_$ctor_Z721C83C5(paramName) {
|
|
|
285
285
|
return ArgumentOutOfRangeException_$ctor_Z384F8060(paramName, SR_Arg_ArgumentOutOfRangeException);
|
|
286
286
|
}
|
|
287
287
|
export function ArgumentOutOfRangeException_$ctor() {
|
|
288
|
-
return ArgumentOutOfRangeException_$ctor_Z721C83C5(
|
|
288
|
+
return ArgumentOutOfRangeException_$ctor_Z721C83C5(defaultOf());
|
|
289
289
|
}
|
package/TimeOnly.js
CHANGED
|
@@ -28,7 +28,7 @@ export function add(t, ts, wrappedDays) {
|
|
|
28
28
|
const t2 = (t + ts) % millisecondsPerDay;
|
|
29
29
|
return t2 < 0 ? millisecondsPerDay + t2 : t2;
|
|
30
30
|
}
|
|
31
|
-
wrappedDays.contents = ts / millisecondsPerDay;
|
|
31
|
+
wrappedDays.contents = Math.trunc(ts / millisecondsPerDay);
|
|
32
32
|
let newMs = t + ts % millisecondsPerDay;
|
|
33
33
|
if (newMs < 0) {
|
|
34
34
|
wrappedDays.contents--;
|
package/Types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Exception,
|
|
1
|
+
import { Exception, combineHashCode, compare, compareArrays, equalArrays, equals, sameConstructor, numberHash, structuralHash } from "./Util.js";
|
|
2
2
|
export function seqToString(self) {
|
|
3
3
|
let count = 0;
|
|
4
4
|
let str = "[";
|
|
@@ -69,9 +69,11 @@ export class Union {
|
|
|
69
69
|
return unionToString(this.name, this.fields);
|
|
70
70
|
}
|
|
71
71
|
GetHashCode() {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
let h = combineHashCode(0, numberHash(this.tag));
|
|
73
|
+
for (let i = 0; i < this.fields.length; i++) {
|
|
74
|
+
h = combineHashCode(h, structuralHash(this.fields[i]));
|
|
75
|
+
}
|
|
76
|
+
return h;
|
|
75
77
|
}
|
|
76
78
|
Equals(other) {
|
|
77
79
|
if (this === other) {
|
|
@@ -114,8 +116,13 @@ function recordToString(self) {
|
|
|
114
116
|
return "{ " + Object.entries(self).map(([k, v]) => k + " = " + toStringQuoted(v)).join("\n ") + " }";
|
|
115
117
|
}
|
|
116
118
|
function recordGetHashCode(self) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
// Snapshot all values before calling any user-defined hash functions.
|
|
120
|
+
const values = Object.values(self);
|
|
121
|
+
let hash = 0;
|
|
122
|
+
for (let i = 0; i < values.length; i++) {
|
|
123
|
+
hash = combineHashCode(hash, structuralHash(values[i]));
|
|
124
|
+
}
|
|
125
|
+
return hash;
|
|
119
126
|
}
|
|
120
127
|
function recordEquals(self, other) {
|
|
121
128
|
if (self === other) {
|
|
@@ -161,19 +168,27 @@ export class Record {
|
|
|
161
168
|
}
|
|
162
169
|
export class FSharpRef {
|
|
163
170
|
get contents() {
|
|
164
|
-
return this.getter();
|
|
171
|
+
return this.getter === undefined ? this.value : this.getter();
|
|
165
172
|
}
|
|
166
173
|
set contents(v) {
|
|
167
|
-
this.setter
|
|
174
|
+
if (this.setter === undefined) {
|
|
175
|
+
this.value = v;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
this.setter(v);
|
|
179
|
+
}
|
|
168
180
|
}
|
|
181
|
+
// Same field layout on both paths so every cell shares one hidden class
|
|
169
182
|
constructor(contentsOrGetter, setter) {
|
|
170
183
|
if (typeof setter === "function") {
|
|
171
184
|
this.getter = contentsOrGetter;
|
|
172
185
|
this.setter = setter;
|
|
186
|
+
this.value = undefined;
|
|
173
187
|
}
|
|
174
188
|
else {
|
|
175
|
-
this.getter =
|
|
176
|
-
this.setter =
|
|
189
|
+
this.getter = undefined;
|
|
190
|
+
this.setter = undefined;
|
|
191
|
+
this.value = contentsOrGetter;
|
|
177
192
|
}
|
|
178
193
|
}
|
|
179
194
|
}
|
package/Util.js
CHANGED
|
@@ -106,10 +106,43 @@ export function toEnumerable(e) {
|
|
|
106
106
|
return new Enumerable(new Enumerator(e[Symbol.iterator]()));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
// Walks an array by index: the iterator protocol allocates a result object per element
|
|
110
|
+
export class ArrayEnumerator {
|
|
111
|
+
constructor(array) {
|
|
112
|
+
this.current = defaultOf();
|
|
113
|
+
this.index = -1;
|
|
114
|
+
this.array = array;
|
|
115
|
+
}
|
|
116
|
+
["System.Collections.Generic.IEnumerator`1.get_Current"]() {
|
|
117
|
+
return this.current;
|
|
118
|
+
}
|
|
119
|
+
["System.Collections.IEnumerator.get_Current"]() {
|
|
120
|
+
return this.current;
|
|
121
|
+
}
|
|
122
|
+
["System.Collections.IEnumerator.MoveNext"]() {
|
|
123
|
+
const i = ++this.index;
|
|
124
|
+
if (i < this.array.length) {
|
|
125
|
+
this.current = this.array[i];
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
this.current = defaultOf();
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
["System.Collections.IEnumerator.Reset"]() {
|
|
132
|
+
this.index = -1;
|
|
133
|
+
this.current = defaultOf();
|
|
134
|
+
}
|
|
135
|
+
Dispose() {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
109
139
|
export function getEnumerator(e) {
|
|
110
140
|
if (isEnumerable(e)) {
|
|
111
141
|
return e.GetEnumerator();
|
|
112
142
|
}
|
|
143
|
+
else if (Array.isArray(e)) {
|
|
144
|
+
return new ArrayEnumerator(e);
|
|
145
|
+
}
|
|
113
146
|
else {
|
|
114
147
|
return new Enumerator(e[Symbol.iterator]());
|
|
115
148
|
}
|
|
@@ -235,12 +268,14 @@ export function bigintHash(x) {
|
|
|
235
268
|
return stringHash(x.toString(32));
|
|
236
269
|
}
|
|
237
270
|
// From https://stackoverflow.com/a/37449594
|
|
271
|
+
export function combineHashCode(h1, h2) {
|
|
272
|
+
return ((h1 << 5) + h1) ^ h2;
|
|
273
|
+
}
|
|
238
274
|
export function combineHashCodes(hashes) {
|
|
239
275
|
let h1 = 0;
|
|
240
276
|
const len = hashes.length;
|
|
241
277
|
for (let i = 0; i < len; i++) {
|
|
242
|
-
|
|
243
|
-
h1 = ((h1 << 5) + h1) ^ h2;
|
|
278
|
+
h1 = combineHashCode(h1, hashes[i]);
|
|
244
279
|
}
|
|
245
280
|
return h1;
|
|
246
281
|
}
|
|
@@ -273,12 +308,11 @@ export function dateHash(x) {
|
|
|
273
308
|
return x.getTime();
|
|
274
309
|
}
|
|
275
310
|
export function arrayHash(x) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
hashes[i] = structuralHash(x[i]);
|
|
311
|
+
let h = 0;
|
|
312
|
+
for (let i = 0; i < x.length; i++) {
|
|
313
|
+
h = combineHashCode(h, structuralHash(x[i]));
|
|
280
314
|
}
|
|
281
|
-
return
|
|
315
|
+
return h;
|
|
282
316
|
}
|
|
283
317
|
export function structuralHash(x) {
|
|
284
318
|
if (x == null) {
|
|
@@ -305,8 +339,13 @@ export function structuralHash(x) {
|
|
|
305
339
|
}
|
|
306
340
|
else if (Object.getPrototypeOf(x)?.constructor === Object) {
|
|
307
341
|
// TODO: check call-stack to prevent cyclic objects?
|
|
308
|
-
|
|
309
|
-
|
|
342
|
+
// Snapshot values before user hashing can mutate the object.
|
|
343
|
+
const values = Object.values(x);
|
|
344
|
+
let hash = 0;
|
|
345
|
+
for (let i = 0; i < values.length; i++) {
|
|
346
|
+
hash = combineHashCode(hash, structuralHash(values[i]));
|
|
347
|
+
}
|
|
348
|
+
return hash;
|
|
310
349
|
}
|
|
311
350
|
else {
|
|
312
351
|
// Classes don't implement GetHashCode by default, but must use identity hashing
|
|
@@ -578,28 +617,32 @@ export function clear(col) {
|
|
|
578
617
|
// TODO: throw for other collections?
|
|
579
618
|
}
|
|
580
619
|
}
|
|
581
|
-
|
|
620
|
+
// The original curried function rides on its adapter so curryN can hand it back
|
|
621
|
+
const curriedKey = Symbol("curried");
|
|
622
|
+
function getCurried(f) {
|
|
623
|
+
return f == null ? undefined : f[curriedKey];
|
|
624
|
+
}
|
|
582
625
|
export function uncurry2(f) {
|
|
583
626
|
if (f == null) {
|
|
584
627
|
return null;
|
|
585
628
|
}
|
|
586
629
|
const f2 = (a1, a2) => f(a1)(a2);
|
|
587
|
-
|
|
630
|
+
f2[curriedKey] = f;
|
|
588
631
|
return f2;
|
|
589
632
|
}
|
|
590
633
|
export function curry2(f) {
|
|
591
|
-
return
|
|
634
|
+
return getCurried(f) ?? ((a1) => (a2) => f(a1, a2));
|
|
592
635
|
}
|
|
593
636
|
export function uncurry3(f) {
|
|
594
637
|
if (f == null) {
|
|
595
638
|
return null;
|
|
596
639
|
}
|
|
597
640
|
const f2 = (a1, a2, a3) => f(a1)(a2)(a3);
|
|
598
|
-
|
|
641
|
+
f2[curriedKey] = f;
|
|
599
642
|
return f2;
|
|
600
643
|
}
|
|
601
644
|
export function curry3(f) {
|
|
602
|
-
return
|
|
645
|
+
return getCurried(f)
|
|
603
646
|
?? ((a1) => (a2) => (a3) => f(a1, a2, a3));
|
|
604
647
|
}
|
|
605
648
|
export function uncurry4(f) {
|
|
@@ -607,11 +650,11 @@ export function uncurry4(f) {
|
|
|
607
650
|
return null;
|
|
608
651
|
}
|
|
609
652
|
const f2 = (a1, a2, a3, a4) => f(a1)(a2)(a3)(a4);
|
|
610
|
-
|
|
653
|
+
f2[curriedKey] = f;
|
|
611
654
|
return f2;
|
|
612
655
|
}
|
|
613
656
|
export function curry4(f) {
|
|
614
|
-
return
|
|
657
|
+
return getCurried(f)
|
|
615
658
|
?? ((a1) => (a2) => (a3) => (a4) => f(a1, a2, a3, a4));
|
|
616
659
|
}
|
|
617
660
|
export function uncurry5(f) {
|
|
@@ -619,11 +662,11 @@ export function uncurry5(f) {
|
|
|
619
662
|
return null;
|
|
620
663
|
}
|
|
621
664
|
const f2 = (a1, a2, a3, a4, a5) => f(a1)(a2)(a3)(a4)(a5);
|
|
622
|
-
|
|
665
|
+
f2[curriedKey] = f;
|
|
623
666
|
return f2;
|
|
624
667
|
}
|
|
625
668
|
export function curry5(f) {
|
|
626
|
-
return
|
|
669
|
+
return getCurried(f)
|
|
627
670
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => f(a1, a2, a3, a4, a5));
|
|
628
671
|
}
|
|
629
672
|
export function uncurry6(f) {
|
|
@@ -631,11 +674,11 @@ export function uncurry6(f) {
|
|
|
631
674
|
return null;
|
|
632
675
|
}
|
|
633
676
|
const f2 = (a1, a2, a3, a4, a5, a6) => f(a1)(a2)(a3)(a4)(a5)(a6);
|
|
634
|
-
|
|
677
|
+
f2[curriedKey] = f;
|
|
635
678
|
return f2;
|
|
636
679
|
}
|
|
637
680
|
export function curry6(f) {
|
|
638
|
-
return
|
|
681
|
+
return getCurried(f)
|
|
639
682
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => f(a1, a2, a3, a4, a5, a6));
|
|
640
683
|
}
|
|
641
684
|
export function uncurry7(f) {
|
|
@@ -643,11 +686,11 @@ export function uncurry7(f) {
|
|
|
643
686
|
return null;
|
|
644
687
|
}
|
|
645
688
|
const f2 = (a1, a2, a3, a4, a5, a6, a7) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7);
|
|
646
|
-
|
|
689
|
+
f2[curriedKey] = f;
|
|
647
690
|
return f2;
|
|
648
691
|
}
|
|
649
692
|
export function curry7(f) {
|
|
650
|
-
return
|
|
693
|
+
return getCurried(f)
|
|
651
694
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => f(a1, a2, a3, a4, a5, a6, a7));
|
|
652
695
|
}
|
|
653
696
|
export function uncurry8(f) {
|
|
@@ -655,11 +698,11 @@ export function uncurry8(f) {
|
|
|
655
698
|
return null;
|
|
656
699
|
}
|
|
657
700
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8);
|
|
658
|
-
|
|
701
|
+
f2[curriedKey] = f;
|
|
659
702
|
return f2;
|
|
660
703
|
}
|
|
661
704
|
export function curry8(f) {
|
|
662
|
-
return
|
|
705
|
+
return getCurried(f)
|
|
663
706
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => f(a1, a2, a3, a4, a5, a6, a7, a8));
|
|
664
707
|
}
|
|
665
708
|
export function uncurry9(f) {
|
|
@@ -667,11 +710,11 @@ export function uncurry9(f) {
|
|
|
667
710
|
return null;
|
|
668
711
|
}
|
|
669
712
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9);
|
|
670
|
-
|
|
713
|
+
f2[curriedKey] = f;
|
|
671
714
|
return f2;
|
|
672
715
|
}
|
|
673
716
|
export function curry9(f) {
|
|
674
|
-
return
|
|
717
|
+
return getCurried(f)
|
|
675
718
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
|
676
719
|
}
|
|
677
720
|
export function uncurry10(f) {
|
|
@@ -679,11 +722,11 @@ export function uncurry10(f) {
|
|
|
679
722
|
return null;
|
|
680
723
|
}
|
|
681
724
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10);
|
|
682
|
-
|
|
725
|
+
f2[curriedKey] = f;
|
|
683
726
|
return f2;
|
|
684
727
|
}
|
|
685
728
|
export function curry10(f) {
|
|
686
|
-
return
|
|
729
|
+
return getCurried(f)
|
|
687
730
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10));
|
|
688
731
|
}
|
|
689
732
|
export function uncurry11(f) {
|
|
@@ -691,11 +734,11 @@ export function uncurry11(f) {
|
|
|
691
734
|
return null;
|
|
692
735
|
}
|
|
693
736
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11);
|
|
694
|
-
|
|
737
|
+
f2[curriedKey] = f;
|
|
695
738
|
return f2;
|
|
696
739
|
}
|
|
697
740
|
export function curry11(f) {
|
|
698
|
-
return
|
|
741
|
+
return getCurried(f)
|
|
699
742
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11));
|
|
700
743
|
}
|
|
701
744
|
export function uncurry12(f) {
|
|
@@ -703,11 +746,11 @@ export function uncurry12(f) {
|
|
|
703
746
|
return null;
|
|
704
747
|
}
|
|
705
748
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12);
|
|
706
|
-
|
|
749
|
+
f2[curriedKey] = f;
|
|
707
750
|
return f2;
|
|
708
751
|
}
|
|
709
752
|
export function curry12(f) {
|
|
710
|
-
return
|
|
753
|
+
return getCurried(f)
|
|
711
754
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12));
|
|
712
755
|
}
|
|
713
756
|
export function uncurry13(f) {
|
|
@@ -715,11 +758,11 @@ export function uncurry13(f) {
|
|
|
715
758
|
return null;
|
|
716
759
|
}
|
|
717
760
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13);
|
|
718
|
-
|
|
761
|
+
f2[curriedKey] = f;
|
|
719
762
|
return f2;
|
|
720
763
|
}
|
|
721
764
|
export function curry13(f) {
|
|
722
|
-
return
|
|
765
|
+
return getCurried(f)
|
|
723
766
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13));
|
|
724
767
|
}
|
|
725
768
|
export function uncurry14(f) {
|
|
@@ -727,11 +770,11 @@ export function uncurry14(f) {
|
|
|
727
770
|
return null;
|
|
728
771
|
}
|
|
729
772
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14);
|
|
730
|
-
|
|
773
|
+
f2[curriedKey] = f;
|
|
731
774
|
return f2;
|
|
732
775
|
}
|
|
733
776
|
export function curry14(f) {
|
|
734
|
-
return
|
|
777
|
+
return getCurried(f)
|
|
735
778
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14));
|
|
736
779
|
}
|
|
737
780
|
export function uncurry15(f) {
|
|
@@ -739,11 +782,11 @@ export function uncurry15(f) {
|
|
|
739
782
|
return null;
|
|
740
783
|
}
|
|
741
784
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15);
|
|
742
|
-
|
|
785
|
+
f2[curriedKey] = f;
|
|
743
786
|
return f2;
|
|
744
787
|
}
|
|
745
788
|
export function curry15(f) {
|
|
746
|
-
return
|
|
789
|
+
return getCurried(f)
|
|
747
790
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15));
|
|
748
791
|
}
|
|
749
792
|
export function uncurry16(f) {
|
|
@@ -751,11 +794,11 @@ export function uncurry16(f) {
|
|
|
751
794
|
return null;
|
|
752
795
|
}
|
|
753
796
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16);
|
|
754
|
-
|
|
797
|
+
f2[curriedKey] = f;
|
|
755
798
|
return f2;
|
|
756
799
|
}
|
|
757
800
|
export function curry16(f) {
|
|
758
|
-
return
|
|
801
|
+
return getCurried(f)
|
|
759
802
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16));
|
|
760
803
|
}
|
|
761
804
|
export function uncurry17(f) {
|
|
@@ -763,11 +806,11 @@ export function uncurry17(f) {
|
|
|
763
806
|
return null;
|
|
764
807
|
}
|
|
765
808
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16)(a17);
|
|
766
|
-
|
|
809
|
+
f2[curriedKey] = f;
|
|
767
810
|
return f2;
|
|
768
811
|
}
|
|
769
812
|
export function curry17(f) {
|
|
770
|
-
return
|
|
813
|
+
return getCurried(f)
|
|
771
814
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => (a17) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17));
|
|
772
815
|
}
|
|
773
816
|
export function uncurry18(f) {
|
|
@@ -775,11 +818,11 @@ export function uncurry18(f) {
|
|
|
775
818
|
return null;
|
|
776
819
|
}
|
|
777
820
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16)(a17)(a18);
|
|
778
|
-
|
|
821
|
+
f2[curriedKey] = f;
|
|
779
822
|
return f2;
|
|
780
823
|
}
|
|
781
824
|
export function curry18(f) {
|
|
782
|
-
return
|
|
825
|
+
return getCurried(f)
|
|
783
826
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => (a17) => (a18) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18));
|
|
784
827
|
}
|
|
785
828
|
export function uncurry19(f) {
|
|
@@ -787,11 +830,11 @@ export function uncurry19(f) {
|
|
|
787
830
|
return null;
|
|
788
831
|
}
|
|
789
832
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16)(a17)(a18)(a19);
|
|
790
|
-
|
|
833
|
+
f2[curriedKey] = f;
|
|
791
834
|
return f2;
|
|
792
835
|
}
|
|
793
836
|
export function curry19(f) {
|
|
794
|
-
return
|
|
837
|
+
return getCurried(f)
|
|
795
838
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => (a17) => (a18) => (a19) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19));
|
|
796
839
|
}
|
|
797
840
|
export function uncurry20(f) {
|
|
@@ -799,11 +842,11 @@ export function uncurry20(f) {
|
|
|
799
842
|
return null;
|
|
800
843
|
}
|
|
801
844
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16)(a17)(a18)(a19)(a20);
|
|
802
|
-
|
|
845
|
+
f2[curriedKey] = f;
|
|
803
846
|
return f2;
|
|
804
847
|
}
|
|
805
848
|
export function curry20(f) {
|
|
806
|
-
return
|
|
849
|
+
return getCurried(f)
|
|
807
850
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => (a17) => (a18) => (a19) => (a20) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20));
|
|
808
851
|
}
|
|
809
852
|
// More performant method to copy arrays, see #2352
|
package/package.json
CHANGED