@magnusopera/fscript 0.87.2 → 0.88.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.
@@ -0,0 +1,2870 @@
1
+
2
+ import { MapKey, Value } from "./Value.js";
3
+ import { defaultOf, sign, comparePrimitives, Exception } from "../fable_modules/fable-library-js.5.24.0/Util.js";
4
+ import { toInt32_unchecked, fromInt32, toInt64_unchecked, compare } from "../fable_modules/fable-library-js.5.24.0/BigInt.js";
5
+ import { compareOrdinal } from "../fable_modules/fable-library-js.5.24.0/String.js";
6
+ import { Execution_fold, Execution_map, Execution$1, Execution$1__get_IsImmediate } from "./Execution.js";
7
+ import { last, chunkBySize, unzip, zip, skip, length, take, ofArray, mapIndexed, singleton, map, append, empty, reverse, cons, head as head_3, tail as tail_7, isEmpty } from "../fable_modules/fable-library-js.5.24.0/List.js";
8
+ import { toList } from "../fable_modules/fable-library-js.5.24.0/Seq.js";
9
+ import { rangeDouble } from "../fable_modules/fable-library-js.5.24.0/Range.js";
10
+ import { remove, add, tryFind, toList as toList_1 } from "../fable_modules/fable-library-js.5.24.0/Map.js";
11
+ import { toArray } from "../fable_modules/fable-library-js.5.24.0/Option.js";
12
+ import { invokeScalar } from "./SupportLibrary.js";
13
+
14
+ function keyValue(_arg) {
15
+ switch (_arg.tag) {
16
+ case 1:
17
+ return new Value(/* VInt */ 1, [_arg.fields[0]]);
18
+ case 2:
19
+ return new Value(/* VBool */ 3, [_arg.fields[0]]);
20
+ case 3:
21
+ return new Value(/* VUnionCase */ 10, [_arg.fields[0], _arg.fields[1], undefined]);
22
+ default:
23
+ return new Value(/* VString */ 4, [_arg.fields[0]]);
24
+ }
25
+ }
26
+
27
+ function mapKey(_arg) {
28
+ let matchResult, x, x_1, x_2, c, t;
29
+ switch (_arg.tag) {
30
+ case 4: {
31
+ matchResult = 0;
32
+ x = _arg.fields[0];
33
+ break;
34
+ }
35
+ case 1: {
36
+ matchResult = 1;
37
+ x_1 = _arg.fields[0];
38
+ break;
39
+ }
40
+ case 3: {
41
+ matchResult = 2;
42
+ x_2 = _arg.fields[0];
43
+ break;
44
+ }
45
+ case 10: {
46
+ if (_arg.fields[2] == null) {
47
+ matchResult = 3;
48
+ c = _arg.fields[1];
49
+ t = _arg.fields[0];
50
+ }
51
+ else {
52
+ matchResult = 4;
53
+ }
54
+ break;
55
+ }
56
+ default:
57
+ matchResult = 4;
58
+ }
59
+ switch (matchResult) {
60
+ case 0:
61
+ return new MapKey(/* MKString */ 0, [x]);
62
+ case 1:
63
+ return new MapKey(/* MKInt */ 1, [x_1]);
64
+ case 2:
65
+ return new MapKey(/* MKBool */ 2, [x_2]);
66
+ case 3:
67
+ return new MapKey(/* MKUnionCase */ 3, [t, c]);
68
+ default:
69
+ throw new Exception("Unsupported map key. (Parameter \'key\')");
70
+ }
71
+ }
72
+
73
+ function boolValue(_arg) {
74
+ if (_arg.tag === 3) {
75
+ return _arg.fields[0];
76
+ }
77
+ else {
78
+ throw new Exception("Expected bool. (Parameter \'predicate\')");
79
+ }
80
+ }
81
+
82
+ function count(value) {
83
+ if ((compare(value, 0n) < 0) ? true : (compare(value, toInt64_unchecked(fromInt32(2147483647))) > 0)) {
84
+ throw new Exception("Count must be between 0 and 2147483647. (Parameter \'count\')");
85
+ }
86
+ return ~~toInt32_unchecked(value) | 0;
87
+ }
88
+
89
+ function compareKey(left, right) {
90
+ let matchResult, a, b, a_1, b_1, a_2, b_2, a_3, b_3;
91
+ switch (left.tag) {
92
+ case 1: {
93
+ if (right.tag === 1) {
94
+ matchResult = 0;
95
+ a = left.fields[0];
96
+ b = right.fields[0];
97
+ }
98
+ else {
99
+ matchResult = 5;
100
+ }
101
+ break;
102
+ }
103
+ case 2: {
104
+ if (right.tag === 2) {
105
+ matchResult = 1;
106
+ a_1 = left.fields[0];
107
+ b_1 = right.fields[0];
108
+ }
109
+ else {
110
+ matchResult = 5;
111
+ }
112
+ break;
113
+ }
114
+ case 4: {
115
+ if (right.tag === 4) {
116
+ matchResult = 2;
117
+ a_2 = left.fields[0];
118
+ b_2 = right.fields[0];
119
+ }
120
+ else {
121
+ matchResult = 5;
122
+ }
123
+ break;
124
+ }
125
+ case 3: {
126
+ if (right.tag === 3) {
127
+ matchResult = 3;
128
+ a_3 = left.fields[0];
129
+ b_3 = right.fields[0];
130
+ }
131
+ else {
132
+ matchResult = 5;
133
+ }
134
+ break;
135
+ }
136
+ case 0: {
137
+ if (right.tag === 0) {
138
+ matchResult = 4;
139
+ }
140
+ else {
141
+ matchResult = 5;
142
+ }
143
+ break;
144
+ }
145
+ default:
146
+ matchResult = 5;
147
+ }
148
+ switch (matchResult) {
149
+ case 0:
150
+ return compare(a, b) | 0;
151
+ case 1:
152
+ return comparePrimitives(a_1, b_1) | 0;
153
+ case 2:
154
+ return sign(compareOrdinal(a_2, b_2)) | 0;
155
+ case 3:
156
+ return comparePrimitives(a_3, b_3) | 0;
157
+ case 4:
158
+ return 0;
159
+ default:
160
+ throw new Exception("List.sortBy requires scalar keys; use List.sortWith for composite keys. (Parameter \'projection\')");
161
+ }
162
+ }
163
+
164
+ export function invoke(equal, apply, name, arguments$) {
165
+ let value_116;
166
+ const apply2 = (callback, a, b) => {
167
+ const body_2 = apply(callback, a);
168
+ if (Execution$1__get_IsImmediate(body_2)) {
169
+ return apply(body_2.Value, b);
170
+ }
171
+ else {
172
+ return new Execution$1(defaultOf(), (continuation) => {
173
+ const execution_1 = body_2;
174
+ if (Execution$1__get_IsImmediate(execution_1)) {
175
+ const execution = apply(execution_1.Value, b);
176
+ const continuation_1 = continuation;
177
+ if (Execution$1__get_IsImmediate(execution)) {
178
+ return continuation_1(execution.Value);
179
+ }
180
+ else {
181
+ return execution.Resume(continuation_1);
182
+ }
183
+ }
184
+ else {
185
+ return execution_1.Resume((value) => {
186
+ const execution = apply(value, b);
187
+ const continuation_1 = continuation;
188
+ return Execution$1__get_IsImmediate(execution) ? continuation_1(execution.Value) : execution.Resume(continuation_1);
189
+ });
190
+ }
191
+ });
192
+ }
193
+ };
194
+ const predicate = (callback_2, value_2) => {
195
+ const body_7 = apply(callback_2, value_2);
196
+ if (Execution$1__get_IsImmediate(body_7)) {
197
+ return new Execution$1(boolValue(body_7.Value), defaultOf());
198
+ }
199
+ else {
200
+ return new Execution$1(false, (continuation_6) => {
201
+ const execution_5 = body_7;
202
+ if (Execution$1__get_IsImmediate(execution_5)) {
203
+ const execution_4 = new Execution$1(boolValue(execution_5.Value), defaultOf());
204
+ const continuation_7 = continuation_6;
205
+ if (Execution$1__get_IsImmediate(execution_4)) {
206
+ return continuation_7(execution_4.Value);
207
+ }
208
+ else {
209
+ return execution_4.Resume(continuation_7);
210
+ }
211
+ }
212
+ else {
213
+ return execution_5.Resume((value_5) => {
214
+ const execution_4 = new Execution$1(boolValue(value_5), defaultOf());
215
+ const continuation_7 = continuation_6;
216
+ return Execution$1__get_IsImmediate(execution_4) ? continuation_7(execution_4.Value) : execution_4.Resume(continuation_7);
217
+ });
218
+ }
219
+ });
220
+ }
221
+ };
222
+ const every = (callback_3_mut, wanted_mut, _arg_3_mut) => {
223
+ every:
224
+ while (true) {
225
+ const callback_3 = callback_3_mut, wanted = wanted_mut, _arg_3 = _arg_3_mut;
226
+ if (!isEmpty(_arg_3)) {
227
+ const tail = tail_7(_arg_3);
228
+ const body_10 = predicate(callback_3, head_3(_arg_3));
229
+ if (Execution$1__get_IsImmediate(body_10)) {
230
+ const result_1 = body_10.Value;
231
+ if (result_1 !== wanted) {
232
+ return new Execution$1(result_1, defaultOf());
233
+ }
234
+ else {
235
+ callback_3_mut = callback_3;
236
+ wanted_mut = wanted;
237
+ _arg_3_mut = tail;
238
+ continue every;
239
+ }
240
+ }
241
+ else {
242
+ return new Execution$1(false, (continuation_9) => {
243
+ const execution_7 = body_10;
244
+ if (Execution$1__get_IsImmediate(execution_7)) {
245
+ let execution_6;
246
+ const result_1 = execution_7.Value;
247
+ execution_6 = ((result_1 !== wanted) ? (new Execution$1(result_1, defaultOf())) : every(callback_3, wanted, tail));
248
+ const continuation_10 = continuation_9;
249
+ if (Execution$1__get_IsImmediate(execution_6)) {
250
+ return continuation_10(execution_6.Value);
251
+ }
252
+ else {
253
+ return execution_6.Resume(continuation_10);
254
+ }
255
+ }
256
+ else {
257
+ return execution_7.Resume((value_9) => {
258
+ let execution_6;
259
+ const result_1 = value_9;
260
+ execution_6 = ((result_1 !== wanted) ? (new Execution$1(result_1, defaultOf())) : every(callback_3, wanted, tail));
261
+ const continuation_10 = continuation_9;
262
+ return Execution$1__get_IsImmediate(execution_6) ? continuation_10(execution_6.Value) : execution_6.Resume(continuation_10);
263
+ });
264
+ }
265
+ });
266
+ }
267
+ }
268
+ else {
269
+ return new Execution$1(wanted, defaultOf());
270
+ }
271
+ break;
272
+ }
273
+ };
274
+ const span = (callback_4_mut, acc_mut, _arg_5_mut) => {
275
+ span:
276
+ while (true) {
277
+ const callback_4 = callback_4_mut, acc = acc_mut, _arg_5 = _arg_5_mut;
278
+ if (!isEmpty(_arg_5)) {
279
+ const tail_1 = tail_7(_arg_5);
280
+ const remaining = _arg_5;
281
+ const head_1 = head_3(_arg_5);
282
+ const body_13 = predicate(callback_4, head_1);
283
+ if (Execution$1__get_IsImmediate(body_13)) {
284
+ if (body_13.Value) {
285
+ callback_4_mut = callback_4;
286
+ acc_mut = cons(head_1, acc);
287
+ _arg_5_mut = tail_1;
288
+ continue span;
289
+ }
290
+ else {
291
+ return new Execution$1([reverse(acc), remaining], defaultOf());
292
+ }
293
+ }
294
+ else {
295
+ return new Execution$1(defaultOf(), (continuation_12) => {
296
+ const execution_9 = body_13;
297
+ if (Execution$1__get_IsImmediate(execution_9)) {
298
+ const execution_8 = execution_9.Value ? span(callback_4, cons(head_1, acc), tail_1) : (new Execution$1([reverse(acc), remaining], defaultOf()));
299
+ const continuation_13 = continuation_12;
300
+ if (Execution$1__get_IsImmediate(execution_8)) {
301
+ return continuation_13(execution_8.Value);
302
+ }
303
+ else {
304
+ return execution_8.Resume(continuation_13);
305
+ }
306
+ }
307
+ else {
308
+ return execution_9.Resume((value_13) => {
309
+ const execution_8 = value_13 ? span(callback_4, cons(head_1, acc), tail_1) : (new Execution$1([reverse(acc), remaining], defaultOf()));
310
+ const continuation_13 = continuation_12;
311
+ return Execution$1__get_IsImmediate(execution_8) ? continuation_13(execution_8.Value) : execution_8.Resume(continuation_13);
312
+ });
313
+ }
314
+ });
315
+ }
316
+ }
317
+ else {
318
+ return new Execution$1([reverse(acc), empty()], defaultOf());
319
+ }
320
+ break;
321
+ }
322
+ };
323
+ const sort = (comparer, values) => {
324
+ const merge = (left_mut, right_mut, acc_1_mut) => {
325
+ merge:
326
+ while (true) {
327
+ const left = left_mut, right = right_mut, acc_1 = acc_1_mut;
328
+ let matchResult, rest, a_2, b_2, xs, ys;
329
+ if (!isEmpty(left)) {
330
+ if (!isEmpty(right)) {
331
+ matchResult = 1;
332
+ a_2 = head_3(left);
333
+ b_2 = head_3(right);
334
+ xs = tail_7(left);
335
+ ys = tail_7(right);
336
+ }
337
+ else {
338
+ matchResult = 0;
339
+ rest = left;
340
+ }
341
+ }
342
+ else {
343
+ matchResult = 0;
344
+ rest = right;
345
+ }
346
+ switch (matchResult) {
347
+ case 0:
348
+ return new Execution$1(append(reverse(acc_1), rest), defaultOf());
349
+ default: {
350
+ const body_17 = comparer(a_2)(b_2);
351
+ if (Execution$1__get_IsImmediate(body_17)) {
352
+ if (body_17.Value <= 0) {
353
+ left_mut = xs;
354
+ right_mut = right;
355
+ acc_1_mut = cons(a_2, acc_1);
356
+ continue merge;
357
+ }
358
+ else {
359
+ left_mut = left;
360
+ right_mut = ys;
361
+ acc_1_mut = cons(b_2, acc_1);
362
+ continue merge;
363
+ }
364
+ }
365
+ else {
366
+ return new Execution$1(defaultOf(), (continuation_15) => {
367
+ const execution_11 = body_17;
368
+ if (Execution$1__get_IsImmediate(execution_11)) {
369
+ const execution_10 = (execution_11.Value <= 0) ? merge(xs, right, cons(a_2, acc_1)) : merge(left, ys, cons(b_2, acc_1));
370
+ const continuation_16 = continuation_15;
371
+ if (Execution$1__get_IsImmediate(execution_10)) {
372
+ return continuation_16(execution_10.Value);
373
+ }
374
+ else {
375
+ return execution_10.Resume(continuation_16);
376
+ }
377
+ }
378
+ else {
379
+ return execution_11.Resume((value_16) => {
380
+ const execution_10 = (value_16 <= 0) ? merge(xs, right, cons(a_2, acc_1)) : merge(left, ys, cons(b_2, acc_1));
381
+ const continuation_16 = continuation_15;
382
+ return Execution$1__get_IsImmediate(execution_10) ? continuation_16(execution_10.Value) : execution_10.Resume(continuation_16);
383
+ });
384
+ }
385
+ });
386
+ }
387
+ }
388
+ }
389
+ break;
390
+ }
391
+ };
392
+ const passes = (runs_mut) => {
393
+ passes:
394
+ while (true) {
395
+ const runs = runs_mut;
396
+ if (!isEmpty(runs)) {
397
+ if (isEmpty(tail_7(runs))) {
398
+ return new Execution$1(head_3(runs), defaultOf());
399
+ }
400
+ else {
401
+ const pairs = (acc_2_mut, _arg_8_mut) => {
402
+ pairs:
403
+ while (true) {
404
+ const acc_2 = acc_2_mut, _arg_8 = _arg_8_mut;
405
+ let matchResult_1, a_3, b_3, tail_2, remaining_1;
406
+ if (!isEmpty(_arg_8)) {
407
+ if (!isEmpty(tail_7(_arg_8))) {
408
+ matchResult_1 = 0;
409
+ a_3 = head_3(_arg_8);
410
+ b_3 = head_3(tail_7(_arg_8));
411
+ tail_2 = tail_7(tail_7(_arg_8));
412
+ }
413
+ else {
414
+ matchResult_1 = 1;
415
+ remaining_1 = _arg_8;
416
+ }
417
+ }
418
+ else {
419
+ matchResult_1 = 1;
420
+ remaining_1 = _arg_8;
421
+ }
422
+ switch (matchResult_1) {
423
+ case 0: {
424
+ const body_20 = merge(a_3, b_3, empty());
425
+ if (Execution$1__get_IsImmediate(body_20)) {
426
+ acc_2_mut = cons(body_20.Value, acc_2);
427
+ _arg_8_mut = tail_2;
428
+ continue pairs;
429
+ }
430
+ else {
431
+ return new Execution$1(defaultOf(), (continuation_18) => {
432
+ const execution_13 = body_20;
433
+ if (Execution$1__get_IsImmediate(execution_13)) {
434
+ const execution_12 = pairs(cons(execution_13.Value, acc_2), tail_2);
435
+ const continuation_19 = continuation_18;
436
+ if (Execution$1__get_IsImmediate(execution_12)) {
437
+ return continuation_19(execution_12.Value);
438
+ }
439
+ else {
440
+ return execution_12.Resume(continuation_19);
441
+ }
442
+ }
443
+ else {
444
+ return execution_13.Resume((value_21) => {
445
+ const execution_12 = pairs(cons(value_21, acc_2), tail_2);
446
+ const continuation_19 = continuation_18;
447
+ return Execution$1__get_IsImmediate(execution_12) ? continuation_19(execution_12.Value) : execution_12.Resume(continuation_19);
448
+ });
449
+ }
450
+ });
451
+ }
452
+ }
453
+ default:
454
+ return new Execution$1(append(reverse(acc_2), remaining_1), defaultOf());
455
+ }
456
+ break;
457
+ }
458
+ };
459
+ const body_23 = pairs(empty(), runs);
460
+ if (Execution$1__get_IsImmediate(body_23)) {
461
+ runs_mut = body_23.Value;
462
+ continue passes;
463
+ }
464
+ else {
465
+ return new Execution$1(defaultOf(), (continuation_21) => {
466
+ const execution_15 = body_23;
467
+ if (Execution$1__get_IsImmediate(execution_15)) {
468
+ const execution_14 = passes(execution_15.Value);
469
+ const continuation_22 = continuation_21;
470
+ if (Execution$1__get_IsImmediate(execution_14)) {
471
+ return continuation_22(execution_14.Value);
472
+ }
473
+ else {
474
+ return execution_14.Resume(continuation_22);
475
+ }
476
+ }
477
+ else {
478
+ return execution_15.Resume((value_23) => {
479
+ const execution_14 = passes(value_23);
480
+ const continuation_22 = continuation_21;
481
+ return Execution$1__get_IsImmediate(execution_14) ? continuation_22(execution_14.Value) : execution_14.Resume(continuation_22);
482
+ });
483
+ }
484
+ });
485
+ }
486
+ }
487
+ }
488
+ else {
489
+ return new Execution$1(empty(), defaultOf());
490
+ }
491
+ break;
492
+ }
493
+ };
494
+ return passes(map(singleton, values));
495
+ };
496
+ let matchResult_2, values_1, callback_5, values_2, callback_6, values_3, values_4, callback_7, n, n_1, values_5, n_3, values_6, callback_8, values_7, callback_9, values_8, callback_10, values_9, left_2, right_2, values_10, n_5, values_11, callback_11, initial, values_12, callback_12, values_13, callback_13, values_14, callback_14, values_15, values_16, values_17, values_18, callback_15, values_19, callback_16, key_5, values_20, callback_17, left_5, right_5, callback_18, value_129, value_132, callback_19, value_137, fallback, callback_20, value_145, callback_21, left_6, right_6, value_153;
497
+ switch (name) {
498
+ case "List.isEmpty": {
499
+ if (!isEmpty(arguments$)) {
500
+ if (head_3(arguments$).tag === 5) {
501
+ if (isEmpty(tail_7(arguments$))) {
502
+ matchResult_2 = 0;
503
+ values_1 = head_3(arguments$).fields[0];
504
+ }
505
+ else {
506
+ matchResult_2 = 35;
507
+ }
508
+ }
509
+ else {
510
+ matchResult_2 = 35;
511
+ }
512
+ }
513
+ else {
514
+ matchResult_2 = 35;
515
+ }
516
+ break;
517
+ }
518
+ case "List.forall": {
519
+ if (!isEmpty(arguments$)) {
520
+ if (!isEmpty(tail_7(arguments$))) {
521
+ if (head_3(tail_7(arguments$)).tag === 5) {
522
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
523
+ matchResult_2 = 1;
524
+ callback_5 = head_3(arguments$);
525
+ values_2 = head_3(tail_7(arguments$)).fields[0];
526
+ }
527
+ else {
528
+ matchResult_2 = 35;
529
+ }
530
+ }
531
+ else {
532
+ matchResult_2 = 35;
533
+ }
534
+ }
535
+ else {
536
+ matchResult_2 = 35;
537
+ }
538
+ }
539
+ else {
540
+ matchResult_2 = 35;
541
+ }
542
+ break;
543
+ }
544
+ case "List.mapi": {
545
+ if (!isEmpty(arguments$)) {
546
+ if (!isEmpty(tail_7(arguments$))) {
547
+ if (head_3(tail_7(arguments$)).tag === 5) {
548
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
549
+ matchResult_2 = 2;
550
+ callback_6 = head_3(arguments$);
551
+ values_3 = head_3(tail_7(arguments$)).fields[0];
552
+ }
553
+ else {
554
+ matchResult_2 = 35;
555
+ }
556
+ }
557
+ else {
558
+ matchResult_2 = 35;
559
+ }
560
+ }
561
+ else {
562
+ matchResult_2 = 35;
563
+ }
564
+ }
565
+ else {
566
+ matchResult_2 = 35;
567
+ }
568
+ break;
569
+ }
570
+ case "List.indexed": {
571
+ if (!isEmpty(arguments$)) {
572
+ if (head_3(arguments$).tag === 5) {
573
+ if (isEmpty(tail_7(arguments$))) {
574
+ matchResult_2 = 3;
575
+ values_4 = head_3(arguments$).fields[0];
576
+ }
577
+ else {
578
+ matchResult_2 = 35;
579
+ }
580
+ }
581
+ else {
582
+ matchResult_2 = 35;
583
+ }
584
+ }
585
+ else {
586
+ matchResult_2 = 35;
587
+ }
588
+ break;
589
+ }
590
+ case "List.init": {
591
+ if (!isEmpty(arguments$)) {
592
+ if (head_3(arguments$).tag === 1) {
593
+ if (!isEmpty(tail_7(arguments$))) {
594
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
595
+ matchResult_2 = 4;
596
+ callback_7 = head_3(tail_7(arguments$));
597
+ n = head_3(arguments$).fields[0];
598
+ }
599
+ else {
600
+ matchResult_2 = 35;
601
+ }
602
+ }
603
+ else {
604
+ matchResult_2 = 35;
605
+ }
606
+ }
607
+ else {
608
+ matchResult_2 = 35;
609
+ }
610
+ }
611
+ else {
612
+ matchResult_2 = 35;
613
+ }
614
+ break;
615
+ }
616
+ case "List.take": {
617
+ if (!isEmpty(arguments$)) {
618
+ if (head_3(arguments$).tag === 1) {
619
+ if (!isEmpty(tail_7(arguments$))) {
620
+ if (head_3(tail_7(arguments$)).tag === 5) {
621
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
622
+ matchResult_2 = 5;
623
+ n_1 = head_3(arguments$).fields[0];
624
+ values_5 = head_3(tail_7(arguments$)).fields[0];
625
+ }
626
+ else {
627
+ matchResult_2 = 35;
628
+ }
629
+ }
630
+ else {
631
+ matchResult_2 = 35;
632
+ }
633
+ }
634
+ else {
635
+ matchResult_2 = 35;
636
+ }
637
+ }
638
+ else {
639
+ matchResult_2 = 35;
640
+ }
641
+ }
642
+ else {
643
+ matchResult_2 = 35;
644
+ }
645
+ break;
646
+ }
647
+ case "List.skip": {
648
+ if (!isEmpty(arguments$)) {
649
+ if (head_3(arguments$).tag === 1) {
650
+ if (!isEmpty(tail_7(arguments$))) {
651
+ if (head_3(tail_7(arguments$)).tag === 5) {
652
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
653
+ matchResult_2 = 6;
654
+ n_3 = head_3(arguments$).fields[0];
655
+ values_6 = head_3(tail_7(arguments$)).fields[0];
656
+ }
657
+ else {
658
+ matchResult_2 = 35;
659
+ }
660
+ }
661
+ else {
662
+ matchResult_2 = 35;
663
+ }
664
+ }
665
+ else {
666
+ matchResult_2 = 35;
667
+ }
668
+ }
669
+ else {
670
+ matchResult_2 = 35;
671
+ }
672
+ }
673
+ else {
674
+ matchResult_2 = 35;
675
+ }
676
+ break;
677
+ }
678
+ case "List.takeWhile": {
679
+ if (!isEmpty(arguments$)) {
680
+ if (!isEmpty(tail_7(arguments$))) {
681
+ if (head_3(tail_7(arguments$)).tag === 5) {
682
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
683
+ matchResult_2 = 7;
684
+ callback_8 = head_3(arguments$);
685
+ values_7 = head_3(tail_7(arguments$)).fields[0];
686
+ }
687
+ else {
688
+ matchResult_2 = 35;
689
+ }
690
+ }
691
+ else {
692
+ matchResult_2 = 35;
693
+ }
694
+ }
695
+ else {
696
+ matchResult_2 = 35;
697
+ }
698
+ }
699
+ else {
700
+ matchResult_2 = 35;
701
+ }
702
+ break;
703
+ }
704
+ case "List.skipWhile": {
705
+ if (!isEmpty(arguments$)) {
706
+ if (!isEmpty(tail_7(arguments$))) {
707
+ if (head_3(tail_7(arguments$)).tag === 5) {
708
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
709
+ matchResult_2 = 8;
710
+ callback_9 = head_3(arguments$);
711
+ values_8 = head_3(tail_7(arguments$)).fields[0];
712
+ }
713
+ else {
714
+ matchResult_2 = 35;
715
+ }
716
+ }
717
+ else {
718
+ matchResult_2 = 35;
719
+ }
720
+ }
721
+ else {
722
+ matchResult_2 = 35;
723
+ }
724
+ }
725
+ else {
726
+ matchResult_2 = 35;
727
+ }
728
+ break;
729
+ }
730
+ case "List.partition": {
731
+ if (!isEmpty(arguments$)) {
732
+ if (!isEmpty(tail_7(arguments$))) {
733
+ if (head_3(tail_7(arguments$)).tag === 5) {
734
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
735
+ matchResult_2 = 9;
736
+ callback_10 = head_3(arguments$);
737
+ values_9 = head_3(tail_7(arguments$)).fields[0];
738
+ }
739
+ else {
740
+ matchResult_2 = 35;
741
+ }
742
+ }
743
+ else {
744
+ matchResult_2 = 35;
745
+ }
746
+ }
747
+ else {
748
+ matchResult_2 = 35;
749
+ }
750
+ }
751
+ else {
752
+ matchResult_2 = 35;
753
+ }
754
+ break;
755
+ }
756
+ case "List.zip": {
757
+ if (!isEmpty(arguments$)) {
758
+ if (head_3(arguments$).tag === 5) {
759
+ if (!isEmpty(tail_7(arguments$))) {
760
+ if (head_3(tail_7(arguments$)).tag === 5) {
761
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
762
+ matchResult_2 = 10;
763
+ left_2 = head_3(arguments$).fields[0];
764
+ right_2 = head_3(tail_7(arguments$)).fields[0];
765
+ }
766
+ else {
767
+ matchResult_2 = 35;
768
+ }
769
+ }
770
+ else {
771
+ matchResult_2 = 35;
772
+ }
773
+ }
774
+ else {
775
+ matchResult_2 = 35;
776
+ }
777
+ }
778
+ else {
779
+ matchResult_2 = 35;
780
+ }
781
+ }
782
+ else {
783
+ matchResult_2 = 35;
784
+ }
785
+ break;
786
+ }
787
+ case "List.unzip": {
788
+ if (!isEmpty(arguments$)) {
789
+ if (head_3(arguments$).tag === 5) {
790
+ if (isEmpty(tail_7(arguments$))) {
791
+ matchResult_2 = 11;
792
+ values_10 = head_3(arguments$).fields[0];
793
+ }
794
+ else {
795
+ matchResult_2 = 35;
796
+ }
797
+ }
798
+ else {
799
+ matchResult_2 = 35;
800
+ }
801
+ }
802
+ else {
803
+ matchResult_2 = 35;
804
+ }
805
+ break;
806
+ }
807
+ case "List.chunkBySize": {
808
+ if (!isEmpty(arguments$)) {
809
+ if (head_3(arguments$).tag === 1) {
810
+ if (!isEmpty(tail_7(arguments$))) {
811
+ if (head_3(tail_7(arguments$)).tag === 5) {
812
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
813
+ matchResult_2 = 12;
814
+ n_5 = head_3(arguments$).fields[0];
815
+ values_11 = head_3(tail_7(arguments$)).fields[0];
816
+ }
817
+ else {
818
+ matchResult_2 = 35;
819
+ }
820
+ }
821
+ else {
822
+ matchResult_2 = 35;
823
+ }
824
+ }
825
+ else {
826
+ matchResult_2 = 35;
827
+ }
828
+ }
829
+ else {
830
+ matchResult_2 = 35;
831
+ }
832
+ }
833
+ else {
834
+ matchResult_2 = 35;
835
+ }
836
+ break;
837
+ }
838
+ case "List.scan": {
839
+ if (!isEmpty(arguments$)) {
840
+ if (!isEmpty(tail_7(arguments$))) {
841
+ if (!isEmpty(tail_7(tail_7(arguments$)))) {
842
+ if (head_3(tail_7(tail_7(arguments$))).tag === 5) {
843
+ if (isEmpty(tail_7(tail_7(tail_7(arguments$))))) {
844
+ matchResult_2 = 13;
845
+ callback_11 = head_3(arguments$);
846
+ initial = head_3(tail_7(arguments$));
847
+ values_12 = head_3(tail_7(tail_7(arguments$))).fields[0];
848
+ }
849
+ else {
850
+ matchResult_2 = 35;
851
+ }
852
+ }
853
+ else {
854
+ matchResult_2 = 35;
855
+ }
856
+ }
857
+ else {
858
+ matchResult_2 = 35;
859
+ }
860
+ }
861
+ else {
862
+ matchResult_2 = 35;
863
+ }
864
+ }
865
+ else {
866
+ matchResult_2 = 35;
867
+ }
868
+ break;
869
+ }
870
+ case "List.sortWith": {
871
+ if (!isEmpty(arguments$)) {
872
+ if (!isEmpty(tail_7(arguments$))) {
873
+ if (head_3(tail_7(arguments$)).tag === 5) {
874
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
875
+ matchResult_2 = 14;
876
+ callback_12 = head_3(arguments$);
877
+ values_13 = head_3(tail_7(arguments$)).fields[0];
878
+ }
879
+ else {
880
+ matchResult_2 = 35;
881
+ }
882
+ }
883
+ else {
884
+ matchResult_2 = 35;
885
+ }
886
+ }
887
+ else {
888
+ matchResult_2 = 35;
889
+ }
890
+ }
891
+ else {
892
+ matchResult_2 = 35;
893
+ }
894
+ break;
895
+ }
896
+ case "List.sortBy": {
897
+ if (!isEmpty(arguments$)) {
898
+ if (!isEmpty(tail_7(arguments$))) {
899
+ if (head_3(tail_7(arguments$)).tag === 5) {
900
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
901
+ matchResult_2 = 15;
902
+ callback_13 = head_3(arguments$);
903
+ values_14 = head_3(tail_7(arguments$)).fields[0];
904
+ }
905
+ else {
906
+ matchResult_2 = 35;
907
+ }
908
+ }
909
+ else {
910
+ matchResult_2 = 35;
911
+ }
912
+ }
913
+ else {
914
+ matchResult_2 = 35;
915
+ }
916
+ }
917
+ else {
918
+ matchResult_2 = 35;
919
+ }
920
+ break;
921
+ }
922
+ case "List.distinctBy": {
923
+ if (!isEmpty(arguments$)) {
924
+ if (!isEmpty(tail_7(arguments$))) {
925
+ if (head_3(tail_7(arguments$)).tag === 5) {
926
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
927
+ matchResult_2 = 16;
928
+ callback_14 = head_3(arguments$);
929
+ values_15 = head_3(tail_7(arguments$)).fields[0];
930
+ }
931
+ else {
932
+ matchResult_2 = 35;
933
+ }
934
+ }
935
+ else {
936
+ matchResult_2 = 35;
937
+ }
938
+ }
939
+ else {
940
+ matchResult_2 = 35;
941
+ }
942
+ }
943
+ else {
944
+ matchResult_2 = 35;
945
+ }
946
+ break;
947
+ }
948
+ case "List.groupBy": {
949
+ if (!isEmpty(arguments$)) {
950
+ if (!isEmpty(tail_7(arguments$))) {
951
+ if (head_3(tail_7(arguments$)).tag === 5) {
952
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
953
+ matchResult_2 = 16;
954
+ callback_14 = head_3(arguments$);
955
+ values_15 = head_3(tail_7(arguments$)).fields[0];
956
+ }
957
+ else {
958
+ matchResult_2 = 35;
959
+ }
960
+ }
961
+ else {
962
+ matchResult_2 = 35;
963
+ }
964
+ }
965
+ else {
966
+ matchResult_2 = 35;
967
+ }
968
+ }
969
+ else {
970
+ matchResult_2 = 35;
971
+ }
972
+ break;
973
+ }
974
+ case "List.countBy": {
975
+ if (!isEmpty(arguments$)) {
976
+ if (!isEmpty(tail_7(arguments$))) {
977
+ if (head_3(tail_7(arguments$)).tag === 5) {
978
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
979
+ matchResult_2 = 16;
980
+ callback_14 = head_3(arguments$);
981
+ values_15 = head_3(tail_7(arguments$)).fields[0];
982
+ }
983
+ else {
984
+ matchResult_2 = 35;
985
+ }
986
+ }
987
+ else {
988
+ matchResult_2 = 35;
989
+ }
990
+ }
991
+ else {
992
+ matchResult_2 = 35;
993
+ }
994
+ }
995
+ else {
996
+ matchResult_2 = 35;
997
+ }
998
+ break;
999
+ }
1000
+ case "Map.keys": {
1001
+ if (!isEmpty(arguments$)) {
1002
+ if (head_3(arguments$).tag === 8) {
1003
+ if (isEmpty(tail_7(arguments$))) {
1004
+ matchResult_2 = 17;
1005
+ values_16 = head_3(arguments$).fields[0];
1006
+ }
1007
+ else {
1008
+ matchResult_2 = 35;
1009
+ }
1010
+ }
1011
+ else {
1012
+ matchResult_2 = 35;
1013
+ }
1014
+ }
1015
+ else {
1016
+ matchResult_2 = 35;
1017
+ }
1018
+ break;
1019
+ }
1020
+ case "Map.values": {
1021
+ if (!isEmpty(arguments$)) {
1022
+ if (head_3(arguments$).tag === 8) {
1023
+ if (isEmpty(tail_7(arguments$))) {
1024
+ matchResult_2 = 18;
1025
+ values_17 = head_3(arguments$).fields[0];
1026
+ }
1027
+ else {
1028
+ matchResult_2 = 35;
1029
+ }
1030
+ }
1031
+ else {
1032
+ matchResult_2 = 35;
1033
+ }
1034
+ }
1035
+ else {
1036
+ matchResult_2 = 35;
1037
+ }
1038
+ break;
1039
+ }
1040
+ case "Map.toList": {
1041
+ if (!isEmpty(arguments$)) {
1042
+ if (head_3(arguments$).tag === 8) {
1043
+ if (isEmpty(tail_7(arguments$))) {
1044
+ matchResult_2 = 19;
1045
+ values_18 = head_3(arguments$).fields[0];
1046
+ }
1047
+ else {
1048
+ matchResult_2 = 35;
1049
+ }
1050
+ }
1051
+ else {
1052
+ matchResult_2 = 35;
1053
+ }
1054
+ }
1055
+ else {
1056
+ matchResult_2 = 35;
1057
+ }
1058
+ break;
1059
+ }
1060
+ case "Map.exists": {
1061
+ if (!isEmpty(arguments$)) {
1062
+ if (!isEmpty(tail_7(arguments$))) {
1063
+ if (head_3(tail_7(arguments$)).tag === 8) {
1064
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
1065
+ matchResult_2 = 20;
1066
+ callback_15 = head_3(arguments$);
1067
+ values_19 = head_3(tail_7(arguments$)).fields[0];
1068
+ }
1069
+ else {
1070
+ matchResult_2 = 35;
1071
+ }
1072
+ }
1073
+ else {
1074
+ matchResult_2 = 35;
1075
+ }
1076
+ }
1077
+ else {
1078
+ matchResult_2 = 35;
1079
+ }
1080
+ }
1081
+ else {
1082
+ matchResult_2 = 35;
1083
+ }
1084
+ break;
1085
+ }
1086
+ case "Map.forall": {
1087
+ if (!isEmpty(arguments$)) {
1088
+ if (!isEmpty(tail_7(arguments$))) {
1089
+ if (head_3(tail_7(arguments$)).tag === 8) {
1090
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
1091
+ matchResult_2 = 20;
1092
+ callback_15 = head_3(arguments$);
1093
+ values_19 = head_3(tail_7(arguments$)).fields[0];
1094
+ }
1095
+ else {
1096
+ matchResult_2 = 35;
1097
+ }
1098
+ }
1099
+ else {
1100
+ matchResult_2 = 35;
1101
+ }
1102
+ }
1103
+ else {
1104
+ matchResult_2 = 35;
1105
+ }
1106
+ }
1107
+ else {
1108
+ matchResult_2 = 35;
1109
+ }
1110
+ break;
1111
+ }
1112
+ case "Map.update": {
1113
+ if (!isEmpty(arguments$)) {
1114
+ if (!isEmpty(tail_7(arguments$))) {
1115
+ if (!isEmpty(tail_7(tail_7(arguments$)))) {
1116
+ if (head_3(tail_7(tail_7(arguments$))).tag === 8) {
1117
+ if (isEmpty(tail_7(tail_7(tail_7(arguments$))))) {
1118
+ matchResult_2 = 21;
1119
+ callback_16 = head_3(tail_7(arguments$));
1120
+ key_5 = head_3(arguments$);
1121
+ values_20 = head_3(tail_7(tail_7(arguments$))).fields[0];
1122
+ }
1123
+ else {
1124
+ matchResult_2 = 35;
1125
+ }
1126
+ }
1127
+ else {
1128
+ matchResult_2 = 35;
1129
+ }
1130
+ }
1131
+ else {
1132
+ matchResult_2 = 35;
1133
+ }
1134
+ }
1135
+ else {
1136
+ matchResult_2 = 35;
1137
+ }
1138
+ }
1139
+ else {
1140
+ matchResult_2 = 35;
1141
+ }
1142
+ break;
1143
+ }
1144
+ case "Map.mergeWith": {
1145
+ if (!isEmpty(arguments$)) {
1146
+ if (!isEmpty(tail_7(arguments$))) {
1147
+ if (head_3(tail_7(arguments$)).tag === 8) {
1148
+ if (!isEmpty(tail_7(tail_7(arguments$)))) {
1149
+ if (head_3(tail_7(tail_7(arguments$))).tag === 8) {
1150
+ if (isEmpty(tail_7(tail_7(tail_7(arguments$))))) {
1151
+ matchResult_2 = 22;
1152
+ callback_17 = head_3(arguments$);
1153
+ left_5 = head_3(tail_7(arguments$)).fields[0];
1154
+ right_5 = head_3(tail_7(tail_7(arguments$))).fields[0];
1155
+ }
1156
+ else {
1157
+ matchResult_2 = 35;
1158
+ }
1159
+ }
1160
+ else {
1161
+ matchResult_2 = 35;
1162
+ }
1163
+ }
1164
+ else {
1165
+ matchResult_2 = 35;
1166
+ }
1167
+ }
1168
+ else {
1169
+ matchResult_2 = 35;
1170
+ }
1171
+ }
1172
+ else {
1173
+ matchResult_2 = 35;
1174
+ }
1175
+ }
1176
+ else {
1177
+ matchResult_2 = 35;
1178
+ }
1179
+ break;
1180
+ }
1181
+ case "Option.bind": {
1182
+ if (!isEmpty(arguments$)) {
1183
+ if (!isEmpty(tail_7(arguments$))) {
1184
+ if (head_3(tail_7(arguments$)).tag === 9) {
1185
+ if (head_3(tail_7(arguments$)).fields[0] == null) {
1186
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
1187
+ matchResult_2 = 24;
1188
+ }
1189
+ else {
1190
+ matchResult_2 = 35;
1191
+ }
1192
+ }
1193
+ else if (isEmpty(tail_7(tail_7(arguments$)))) {
1194
+ matchResult_2 = 23;
1195
+ callback_18 = head_3(arguments$);
1196
+ value_129 = head_3(tail_7(arguments$)).fields[0];
1197
+ }
1198
+ else {
1199
+ matchResult_2 = 35;
1200
+ }
1201
+ }
1202
+ else {
1203
+ matchResult_2 = 35;
1204
+ }
1205
+ }
1206
+ else {
1207
+ matchResult_2 = 35;
1208
+ }
1209
+ }
1210
+ else {
1211
+ matchResult_2 = 35;
1212
+ }
1213
+ break;
1214
+ }
1215
+ case "Option.flatten": {
1216
+ if (!isEmpty(arguments$)) {
1217
+ if (head_3(arguments$).tag === 9) {
1218
+ if (head_3(arguments$).fields[0] == null) {
1219
+ if (isEmpty(tail_7(arguments$))) {
1220
+ matchResult_2 = 26;
1221
+ }
1222
+ else {
1223
+ matchResult_2 = 35;
1224
+ }
1225
+ }
1226
+ else if (isEmpty(tail_7(arguments$))) {
1227
+ matchResult_2 = 25;
1228
+ value_132 = head_3(arguments$).fields[0];
1229
+ }
1230
+ else {
1231
+ matchResult_2 = 35;
1232
+ }
1233
+ }
1234
+ else {
1235
+ matchResult_2 = 35;
1236
+ }
1237
+ }
1238
+ else {
1239
+ matchResult_2 = 35;
1240
+ }
1241
+ break;
1242
+ }
1243
+ case "Option.filter": {
1244
+ if (!isEmpty(arguments$)) {
1245
+ if (!isEmpty(tail_7(arguments$))) {
1246
+ if (head_3(tail_7(arguments$)).tag === 9) {
1247
+ if (head_3(tail_7(arguments$)).fields[0] == null) {
1248
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
1249
+ matchResult_2 = 28;
1250
+ }
1251
+ else {
1252
+ matchResult_2 = 35;
1253
+ }
1254
+ }
1255
+ else if (isEmpty(tail_7(tail_7(arguments$)))) {
1256
+ matchResult_2 = 27;
1257
+ callback_19 = head_3(arguments$);
1258
+ value_137 = head_3(tail_7(arguments$)).fields[0];
1259
+ }
1260
+ else {
1261
+ matchResult_2 = 35;
1262
+ }
1263
+ }
1264
+ else {
1265
+ matchResult_2 = 35;
1266
+ }
1267
+ }
1268
+ else {
1269
+ matchResult_2 = 35;
1270
+ }
1271
+ }
1272
+ else {
1273
+ matchResult_2 = 35;
1274
+ }
1275
+ break;
1276
+ }
1277
+ case "Option.orElse": {
1278
+ if (!isEmpty(arguments$)) {
1279
+ if (!isEmpty(tail_7(arguments$))) {
1280
+ if (head_3(tail_7(arguments$)).tag === 9) {
1281
+ if (head_3(tail_7(arguments$)).fields[0] == null) {
1282
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
1283
+ matchResult_2 = 29;
1284
+ fallback = head_3(arguments$);
1285
+ }
1286
+ else {
1287
+ matchResult_2 = 35;
1288
+ }
1289
+ }
1290
+ else if (isEmpty(tail_7(tail_7(arguments$)))) {
1291
+ matchResult_2 = 31;
1292
+ value_145 = head_3(tail_7(arguments$));
1293
+ }
1294
+ else {
1295
+ matchResult_2 = 35;
1296
+ }
1297
+ }
1298
+ else if (isEmpty(tail_7(tail_7(arguments$)))) {
1299
+ matchResult_2 = 31;
1300
+ value_145 = head_3(tail_7(arguments$));
1301
+ }
1302
+ else {
1303
+ matchResult_2 = 35;
1304
+ }
1305
+ }
1306
+ else {
1307
+ matchResult_2 = 35;
1308
+ }
1309
+ }
1310
+ else {
1311
+ matchResult_2 = 35;
1312
+ }
1313
+ break;
1314
+ }
1315
+ case "Option.orElseWith": {
1316
+ if (!isEmpty(arguments$)) {
1317
+ if (!isEmpty(tail_7(arguments$))) {
1318
+ if (head_3(tail_7(arguments$)).tag === 9) {
1319
+ if (head_3(tail_7(arguments$)).fields[0] == null) {
1320
+ if (isEmpty(tail_7(tail_7(arguments$)))) {
1321
+ matchResult_2 = 30;
1322
+ callback_20 = head_3(arguments$);
1323
+ }
1324
+ else {
1325
+ matchResult_2 = 35;
1326
+ }
1327
+ }
1328
+ else if (isEmpty(tail_7(tail_7(arguments$)))) {
1329
+ matchResult_2 = 31;
1330
+ value_145 = head_3(tail_7(arguments$));
1331
+ }
1332
+ else {
1333
+ matchResult_2 = 35;
1334
+ }
1335
+ }
1336
+ else if (isEmpty(tail_7(tail_7(arguments$)))) {
1337
+ matchResult_2 = 31;
1338
+ value_145 = head_3(tail_7(arguments$));
1339
+ }
1340
+ else {
1341
+ matchResult_2 = 35;
1342
+ }
1343
+ }
1344
+ else {
1345
+ matchResult_2 = 35;
1346
+ }
1347
+ }
1348
+ else {
1349
+ matchResult_2 = 35;
1350
+ }
1351
+ break;
1352
+ }
1353
+ case "Option.map2": {
1354
+ if (!isEmpty(arguments$)) {
1355
+ if (!isEmpty(tail_7(arguments$))) {
1356
+ if (head_3(tail_7(arguments$)).tag === 9) {
1357
+ if (head_3(tail_7(arguments$)).fields[0] != null) {
1358
+ if (!isEmpty(tail_7(tail_7(arguments$)))) {
1359
+ if (head_3(tail_7(tail_7(arguments$))).tag === 9) {
1360
+ if (head_3(tail_7(tail_7(arguments$))).fields[0] != null) {
1361
+ if (isEmpty(tail_7(tail_7(tail_7(arguments$))))) {
1362
+ matchResult_2 = 32;
1363
+ callback_21 = head_3(arguments$);
1364
+ left_6 = head_3(tail_7(arguments$)).fields[0];
1365
+ right_6 = head_3(tail_7(tail_7(arguments$))).fields[0];
1366
+ }
1367
+ else {
1368
+ matchResult_2 = 35;
1369
+ }
1370
+ }
1371
+ else if (isEmpty(tail_7(tail_7(tail_7(arguments$))))) {
1372
+ matchResult_2 = 33;
1373
+ }
1374
+ else {
1375
+ matchResult_2 = 35;
1376
+ }
1377
+ }
1378
+ else if (isEmpty(tail_7(tail_7(tail_7(arguments$))))) {
1379
+ matchResult_2 = 33;
1380
+ }
1381
+ else {
1382
+ matchResult_2 = 35;
1383
+ }
1384
+ }
1385
+ else {
1386
+ matchResult_2 = 35;
1387
+ }
1388
+ }
1389
+ else if (!isEmpty(tail_7(tail_7(arguments$)))) {
1390
+ if (isEmpty(tail_7(tail_7(tail_7(arguments$))))) {
1391
+ matchResult_2 = 33;
1392
+ }
1393
+ else {
1394
+ matchResult_2 = 35;
1395
+ }
1396
+ }
1397
+ else {
1398
+ matchResult_2 = 35;
1399
+ }
1400
+ }
1401
+ else if (!isEmpty(tail_7(tail_7(arguments$)))) {
1402
+ if (isEmpty(tail_7(tail_7(tail_7(arguments$))))) {
1403
+ matchResult_2 = 33;
1404
+ }
1405
+ else {
1406
+ matchResult_2 = 35;
1407
+ }
1408
+ }
1409
+ else {
1410
+ matchResult_2 = 35;
1411
+ }
1412
+ }
1413
+ else {
1414
+ matchResult_2 = 35;
1415
+ }
1416
+ }
1417
+ else {
1418
+ matchResult_2 = 35;
1419
+ }
1420
+ break;
1421
+ }
1422
+ case "Option.toList": {
1423
+ if (!isEmpty(arguments$)) {
1424
+ if (head_3(arguments$).tag === 9) {
1425
+ if (isEmpty(tail_7(arguments$))) {
1426
+ matchResult_2 = 34;
1427
+ value_153 = head_3(arguments$).fields[0];
1428
+ }
1429
+ else {
1430
+ matchResult_2 = 35;
1431
+ }
1432
+ }
1433
+ else {
1434
+ matchResult_2 = 35;
1435
+ }
1436
+ }
1437
+ else {
1438
+ matchResult_2 = 35;
1439
+ }
1440
+ break;
1441
+ }
1442
+ default:
1443
+ matchResult_2 = 35;
1444
+ }
1445
+ switch (matchResult_2) {
1446
+ case 0:
1447
+ return new Execution$1(new Value(/* VBool */ 3, [isEmpty(values_1)]), defaultOf());
1448
+ case 1: {
1449
+ const body_25 = every(callback_5, true, values_2);
1450
+ if (Execution$1__get_IsImmediate(body_25)) {
1451
+ return new Execution$1(new Value(/* VBool */ 3, [body_25.Value]), defaultOf());
1452
+ }
1453
+ else {
1454
+ return new Execution$1(defaultOf(), (continuation_24) => {
1455
+ const execution_17 = body_25;
1456
+ if (Execution$1__get_IsImmediate(execution_17)) {
1457
+ const execution_16 = new Execution$1(new Value(/* VBool */ 3, [execution_17.Value]), defaultOf());
1458
+ const continuation_25 = continuation_24;
1459
+ if (Execution$1__get_IsImmediate(execution_16)) {
1460
+ return continuation_25(execution_16.Value);
1461
+ }
1462
+ else {
1463
+ return execution_16.Resume(continuation_25);
1464
+ }
1465
+ }
1466
+ else {
1467
+ return execution_17.Resume((value_29) => {
1468
+ const execution_16 = new Execution$1(new Value(/* VBool */ 3, [value_29]), defaultOf());
1469
+ const continuation_25 = continuation_24;
1470
+ return Execution$1__get_IsImmediate(execution_16) ? continuation_25(execution_16.Value) : execution_16.Resume(continuation_25);
1471
+ });
1472
+ }
1473
+ });
1474
+ }
1475
+ }
1476
+ case 2: {
1477
+ const body_27 = Execution_map((tupledArg) => apply2(callback_6, new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(tupledArg[0]))]), tupledArg[1]), mapIndexed((i, value_30) => [i, value_30], values_3));
1478
+ if (Execution$1__get_IsImmediate(body_27)) {
1479
+ return new Execution$1(new Value(/* VList */ 5, [body_27.Value]), defaultOf());
1480
+ }
1481
+ else {
1482
+ return new Execution$1(defaultOf(), (continuation_27) => {
1483
+ const execution_19 = body_27;
1484
+ if (Execution$1__get_IsImmediate(execution_19)) {
1485
+ const execution_18 = new Execution$1(new Value(/* VList */ 5, [execution_19.Value]), defaultOf());
1486
+ const continuation_28 = continuation_27;
1487
+ if (Execution$1__get_IsImmediate(execution_18)) {
1488
+ return continuation_28(execution_18.Value);
1489
+ }
1490
+ else {
1491
+ return execution_18.Resume(continuation_28);
1492
+ }
1493
+ }
1494
+ else {
1495
+ return execution_19.Resume((value_34) => {
1496
+ const execution_18 = new Execution$1(new Value(/* VList */ 5, [value_34]), defaultOf());
1497
+ const continuation_28 = continuation_27;
1498
+ return Execution$1__get_IsImmediate(execution_18) ? continuation_28(execution_18.Value) : execution_18.Resume(continuation_28);
1499
+ });
1500
+ }
1501
+ });
1502
+ }
1503
+ }
1504
+ case 3:
1505
+ return new Execution$1(new Value(/* VList */ 5, [mapIndexed((i_2, value_35) => (new Value(/* VTuple */ 6, [ofArray([new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(i_2))]), value_35])])), values_4)]), defaultOf());
1506
+ case 4: {
1507
+ const body_29 = Execution_map((i_3) => apply(callback_7, new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(i_3))])), toList(rangeDouble(0, 1, count(n) - 1)));
1508
+ if (Execution$1__get_IsImmediate(body_29)) {
1509
+ return new Execution$1(new Value(/* VList */ 5, [body_29.Value]), defaultOf());
1510
+ }
1511
+ else {
1512
+ return new Execution$1(defaultOf(), (continuation_30) => {
1513
+ const execution_21 = body_29;
1514
+ if (Execution$1__get_IsImmediate(execution_21)) {
1515
+ const execution_20 = new Execution$1(new Value(/* VList */ 5, [execution_21.Value]), defaultOf());
1516
+ const continuation_31 = continuation_30;
1517
+ if (Execution$1__get_IsImmediate(execution_20)) {
1518
+ return continuation_31(execution_20.Value);
1519
+ }
1520
+ else {
1521
+ return execution_20.Resume(continuation_31);
1522
+ }
1523
+ }
1524
+ else {
1525
+ return execution_21.Resume((value_40) => {
1526
+ const execution_20 = new Execution$1(new Value(/* VList */ 5, [value_40]), defaultOf());
1527
+ const continuation_31 = continuation_30;
1528
+ return Execution$1__get_IsImmediate(execution_20) ? continuation_31(execution_20.Value) : execution_20.Resume(continuation_31);
1529
+ });
1530
+ }
1531
+ });
1532
+ }
1533
+ }
1534
+ case 5: {
1535
+ const n_2 = count(n_1) | 0;
1536
+ const second = () => (new Execution$1(new Value(/* VList */ 5, [take(n_2, values_5)]), defaultOf()));
1537
+ let body_30;
1538
+ if (n_2 > length(values_5)) {
1539
+ throw new Exception("Count exceeds list length. (Parameter \'count\')");
1540
+ body_30 = (new Execution$1(undefined, defaultOf()));
1541
+ }
1542
+ else {
1543
+ body_30 = (new Execution$1(undefined, defaultOf()));
1544
+ }
1545
+ if (Execution$1__get_IsImmediate(body_30)) {
1546
+ return second();
1547
+ }
1548
+ else {
1549
+ return new Execution$1(defaultOf(), (continuation_33) => {
1550
+ const execution_23 = body_30;
1551
+ if (Execution$1__get_IsImmediate(execution_23)) {
1552
+ const execution_22 = second();
1553
+ const continuation_34 = continuation_33;
1554
+ if (Execution$1__get_IsImmediate(execution_22)) {
1555
+ return continuation_34(execution_22.Value);
1556
+ }
1557
+ else {
1558
+ return execution_22.Resume(continuation_34);
1559
+ }
1560
+ }
1561
+ else {
1562
+ return execution_23.Resume((value_45) => {
1563
+ const execution_22 = second();
1564
+ const continuation_34 = continuation_33;
1565
+ return Execution$1__get_IsImmediate(execution_22) ? continuation_34(execution_22.Value) : execution_22.Resume(continuation_34);
1566
+ });
1567
+ }
1568
+ });
1569
+ }
1570
+ }
1571
+ case 6: {
1572
+ const n_4 = count(n_3) | 0;
1573
+ const second_1 = () => (new Execution$1(new Value(/* VList */ 5, [skip(n_4, values_6)]), defaultOf()));
1574
+ let body_31;
1575
+ if (n_4 > length(values_6)) {
1576
+ throw new Exception("Count exceeds list length. (Parameter \'count\')");
1577
+ body_31 = (new Execution$1(undefined, defaultOf()));
1578
+ }
1579
+ else {
1580
+ body_31 = (new Execution$1(undefined, defaultOf()));
1581
+ }
1582
+ if (Execution$1__get_IsImmediate(body_31)) {
1583
+ return second_1();
1584
+ }
1585
+ else {
1586
+ return new Execution$1(defaultOf(), (continuation_36) => {
1587
+ const execution_25 = body_31;
1588
+ if (Execution$1__get_IsImmediate(execution_25)) {
1589
+ const execution_24 = second_1();
1590
+ const continuation_37 = continuation_36;
1591
+ if (Execution$1__get_IsImmediate(execution_24)) {
1592
+ return continuation_37(execution_24.Value);
1593
+ }
1594
+ else {
1595
+ return execution_24.Resume(continuation_37);
1596
+ }
1597
+ }
1598
+ else {
1599
+ return execution_25.Resume((value_50) => {
1600
+ const execution_24 = second_1();
1601
+ const continuation_37 = continuation_36;
1602
+ return Execution$1__get_IsImmediate(execution_24) ? continuation_37(execution_24.Value) : execution_24.Resume(continuation_37);
1603
+ });
1604
+ }
1605
+ });
1606
+ }
1607
+ }
1608
+ case 7: {
1609
+ const body_33 = span(callback_8, empty(), values_7);
1610
+ if (Execution$1__get_IsImmediate(body_33)) {
1611
+ return new Execution$1(new Value(/* VList */ 5, [body_33.Value[0]]), defaultOf());
1612
+ }
1613
+ else {
1614
+ return new Execution$1(defaultOf(), (continuation_39) => {
1615
+ const execution_27 = body_33;
1616
+ if (Execution$1__get_IsImmediate(execution_27)) {
1617
+ const execution_26 = new Execution$1(new Value(/* VList */ 5, [execution_27.Value[0]]), defaultOf());
1618
+ const continuation_40 = continuation_39;
1619
+ if (Execution$1__get_IsImmediate(execution_26)) {
1620
+ return continuation_40(execution_26.Value);
1621
+ }
1622
+ else {
1623
+ return execution_26.Resume(continuation_40);
1624
+ }
1625
+ }
1626
+ else {
1627
+ return execution_27.Resume((value_53) => {
1628
+ const execution_26 = new Execution$1(new Value(/* VList */ 5, [value_53[0]]), defaultOf());
1629
+ const continuation_40 = continuation_39;
1630
+ return Execution$1__get_IsImmediate(execution_26) ? continuation_40(execution_26.Value) : execution_26.Resume(continuation_40);
1631
+ });
1632
+ }
1633
+ });
1634
+ }
1635
+ }
1636
+ case 8: {
1637
+ const body_35 = span(callback_9, empty(), values_8);
1638
+ if (Execution$1__get_IsImmediate(body_35)) {
1639
+ return new Execution$1(new Value(/* VList */ 5, [body_35.Value[1]]), defaultOf());
1640
+ }
1641
+ else {
1642
+ return new Execution$1(defaultOf(), (continuation_42) => {
1643
+ const execution_29 = body_35;
1644
+ if (Execution$1__get_IsImmediate(execution_29)) {
1645
+ const execution_28 = new Execution$1(new Value(/* VList */ 5, [execution_29.Value[1]]), defaultOf());
1646
+ const continuation_43 = continuation_42;
1647
+ if (Execution$1__get_IsImmediate(execution_28)) {
1648
+ return continuation_43(execution_28.Value);
1649
+ }
1650
+ else {
1651
+ return execution_28.Resume(continuation_43);
1652
+ }
1653
+ }
1654
+ else {
1655
+ return execution_29.Resume((value_56) => {
1656
+ const execution_28 = new Execution$1(new Value(/* VList */ 5, [value_56[1]]), defaultOf());
1657
+ const continuation_43 = continuation_42;
1658
+ return Execution$1__get_IsImmediate(execution_28) ? continuation_43(execution_28.Value) : execution_28.Resume(continuation_43);
1659
+ });
1660
+ }
1661
+ });
1662
+ }
1663
+ }
1664
+ case 9: {
1665
+ const body_39 = Execution_fold((tupledArg_1, value_57) => {
1666
+ const yes = tupledArg_1[0];
1667
+ const no = tupledArg_1[1];
1668
+ const body_37 = predicate(callback_10, value_57);
1669
+ if (Execution$1__get_IsImmediate(body_37)) {
1670
+ return new Execution$1(body_37.Value ? [cons(value_57, yes), no] : [yes, cons(value_57, no)], defaultOf());
1671
+ }
1672
+ else {
1673
+ return new Execution$1(defaultOf(), (continuation_45) => {
1674
+ const execution_31 = body_37;
1675
+ if (Execution$1__get_IsImmediate(execution_31)) {
1676
+ const execution_30 = new Execution$1(execution_31.Value ? [cons(value_57, yes), no] : [yes, cons(value_57, no)], defaultOf());
1677
+ const continuation_46 = continuation_45;
1678
+ if (Execution$1__get_IsImmediate(execution_30)) {
1679
+ return continuation_46(execution_30.Value);
1680
+ }
1681
+ else {
1682
+ return execution_30.Resume(continuation_46);
1683
+ }
1684
+ }
1685
+ else {
1686
+ return execution_31.Resume((value_60) => {
1687
+ const execution_30 = new Execution$1(value_60 ? [cons(value_57, yes), no] : [yes, cons(value_57, no)], defaultOf());
1688
+ const continuation_46 = continuation_45;
1689
+ return Execution$1__get_IsImmediate(execution_30) ? continuation_46(execution_30.Value) : execution_30.Resume(continuation_46);
1690
+ });
1691
+ }
1692
+ });
1693
+ }
1694
+ }, [empty(), empty()], values_9);
1695
+ if (Execution$1__get_IsImmediate(body_39)) {
1696
+ const _arg_17 = body_39.Value;
1697
+ return new Execution$1(new Value(/* VTuple */ 6, [ofArray([new Value(/* VList */ 5, [reverse(_arg_17[0])]), new Value(/* VList */ 5, [reverse(_arg_17[1])])])]), defaultOf());
1698
+ }
1699
+ else {
1700
+ return new Execution$1(defaultOf(), (continuation_48) => {
1701
+ const execution_33 = body_39;
1702
+ if (Execution$1__get_IsImmediate(execution_33)) {
1703
+ let execution_32;
1704
+ const _arg_17 = execution_33.Value;
1705
+ execution_32 = (new Execution$1(new Value(/* VTuple */ 6, [ofArray([new Value(/* VList */ 5, [reverse(_arg_17[0])]), new Value(/* VList */ 5, [reverse(_arg_17[1])])])]), defaultOf()));
1706
+ const continuation_49 = continuation_48;
1707
+ if (Execution$1__get_IsImmediate(execution_32)) {
1708
+ return continuation_49(execution_32.Value);
1709
+ }
1710
+ else {
1711
+ return execution_32.Resume(continuation_49);
1712
+ }
1713
+ }
1714
+ else {
1715
+ return execution_33.Resume((value_63) => {
1716
+ let execution_32;
1717
+ const _arg_17 = value_63;
1718
+ execution_32 = (new Execution$1(new Value(/* VTuple */ 6, [ofArray([new Value(/* VList */ 5, [reverse(_arg_17[0])]), new Value(/* VList */ 5, [reverse(_arg_17[1])])])]), defaultOf()));
1719
+ const continuation_49 = continuation_48;
1720
+ return Execution$1__get_IsImmediate(execution_32) ? continuation_49(execution_32.Value) : execution_32.Resume(continuation_49);
1721
+ });
1722
+ }
1723
+ });
1724
+ }
1725
+ }
1726
+ case 10:
1727
+ return new Execution$1(new Value(/* VList */ 5, [map((tupledArg_2) => (new Value(/* VTuple */ 6, [ofArray([tupledArg_2[0], tupledArg_2[1]])])), zip(left_2, right_2))]), defaultOf());
1728
+ case 11: {
1729
+ const patternInput = unzip(map((_arg_18) => {
1730
+ let matchResult_3, a_5, b_5;
1731
+ if (_arg_18.tag === 6) {
1732
+ if (!isEmpty(_arg_18.fields[0])) {
1733
+ if (!isEmpty(tail_7(_arg_18.fields[0]))) {
1734
+ if (isEmpty(tail_7(tail_7(_arg_18.fields[0])))) {
1735
+ matchResult_3 = 0;
1736
+ a_5 = head_3(_arg_18.fields[0]);
1737
+ b_5 = head_3(tail_7(_arg_18.fields[0]));
1738
+ }
1739
+ else {
1740
+ matchResult_3 = 1;
1741
+ }
1742
+ }
1743
+ else {
1744
+ matchResult_3 = 1;
1745
+ }
1746
+ }
1747
+ else {
1748
+ matchResult_3 = 1;
1749
+ }
1750
+ }
1751
+ else {
1752
+ matchResult_3 = 1;
1753
+ }
1754
+ switch (matchResult_3) {
1755
+ case 0:
1756
+ return [a_5, b_5];
1757
+ default:
1758
+ throw new Exception("Expected pairs. (Parameter \'pairs\')");
1759
+ }
1760
+ }, values_10));
1761
+ return new Execution$1(new Value(/* VTuple */ 6, [ofArray([new Value(/* VList */ 5, [patternInput[0]]), new Value(/* VList */ 5, [patternInput[1]])])]), defaultOf());
1762
+ }
1763
+ case 12:
1764
+ return new Execution$1(new Value(/* VList */ 5, [map((Item) => (new Value(/* VList */ 5, [Item])), chunkBySize(count(n_5), values_11))]), defaultOf());
1765
+ case 13: {
1766
+ const body_43 = Execution_fold((tupledArg_3, value_70) => {
1767
+ const states = tupledArg_3[1];
1768
+ const body_41 = apply2(callback_11, tupledArg_3[0], value_70);
1769
+ if (Execution$1__get_IsImmediate(body_41)) {
1770
+ const next_2 = body_41.Value;
1771
+ return new Execution$1([next_2, cons(next_2, states)], defaultOf());
1772
+ }
1773
+ else {
1774
+ return new Execution$1(defaultOf(), (continuation_51) => {
1775
+ const execution_35 = body_41;
1776
+ if (Execution$1__get_IsImmediate(execution_35)) {
1777
+ let execution_34;
1778
+ const next_2 = execution_35.Value;
1779
+ execution_34 = (new Execution$1([next_2, cons(next_2, states)], defaultOf()));
1780
+ const continuation_52 = continuation_51;
1781
+ if (Execution$1__get_IsImmediate(execution_34)) {
1782
+ return continuation_52(execution_34.Value);
1783
+ }
1784
+ else {
1785
+ return execution_34.Resume(continuation_52);
1786
+ }
1787
+ }
1788
+ else {
1789
+ return execution_35.Resume((value_73) => {
1790
+ let execution_34;
1791
+ const next_2 = value_73;
1792
+ execution_34 = (new Execution$1([next_2, cons(next_2, states)], defaultOf()));
1793
+ const continuation_52 = continuation_51;
1794
+ return Execution$1__get_IsImmediate(execution_34) ? continuation_52(execution_34.Value) : execution_34.Resume(continuation_52);
1795
+ });
1796
+ }
1797
+ });
1798
+ }
1799
+ }, [initial, singleton(initial)], values_12);
1800
+ if (Execution$1__get_IsImmediate(body_43)) {
1801
+ return new Execution$1(new Value(/* VList */ 5, [reverse(body_43.Value[1])]), defaultOf());
1802
+ }
1803
+ else {
1804
+ return new Execution$1(defaultOf(), (continuation_54) => {
1805
+ const execution_37 = body_43;
1806
+ if (Execution$1__get_IsImmediate(execution_37)) {
1807
+ const execution_36 = new Execution$1(new Value(/* VList */ 5, [reverse(execution_37.Value[1])]), defaultOf());
1808
+ const continuation_55 = continuation_54;
1809
+ if (Execution$1__get_IsImmediate(execution_36)) {
1810
+ return continuation_55(execution_36.Value);
1811
+ }
1812
+ else {
1813
+ return execution_36.Resume(continuation_55);
1814
+ }
1815
+ }
1816
+ else {
1817
+ return execution_37.Resume((value_76) => {
1818
+ const execution_36 = new Execution$1(new Value(/* VList */ 5, [reverse(value_76[1])]), defaultOf());
1819
+ const continuation_55 = continuation_54;
1820
+ return Execution$1__get_IsImmediate(execution_36) ? continuation_55(execution_36.Value) : execution_36.Resume(continuation_55);
1821
+ });
1822
+ }
1823
+ });
1824
+ }
1825
+ }
1826
+ case 14: {
1827
+ const body_47 = sort((a_6) => ((b_6) => {
1828
+ const body_45 = apply2(callback_12, a_6, b_6);
1829
+ if (Execution$1__get_IsImmediate(body_45)) {
1830
+ const result_5 = body_45.Value;
1831
+ return new Execution$1((result_5.tag === 1) ? compare(result_5.fields[0], 0n) : (() => {
1832
+ throw new Exception("Expected int. (Parameter \'comparer\')");
1833
+ })(), defaultOf());
1834
+ }
1835
+ else {
1836
+ return new Execution$1(0, (continuation_57) => {
1837
+ const execution_39 = body_45;
1838
+ if (Execution$1__get_IsImmediate(execution_39)) {
1839
+ let execution_38;
1840
+ const result_5 = execution_39.Value;
1841
+ execution_38 = (new Execution$1((result_5.tag === 1) ? compare(result_5.fields[0], 0n) : (() => {
1842
+ throw new Exception("Expected int. (Parameter \'comparer\')");
1843
+ })(), defaultOf()));
1844
+ const continuation_58 = continuation_57;
1845
+ if (Execution$1__get_IsImmediate(execution_38)) {
1846
+ return continuation_58(execution_38.Value);
1847
+ }
1848
+ else {
1849
+ return execution_38.Resume(continuation_58);
1850
+ }
1851
+ }
1852
+ else {
1853
+ return execution_39.Resume((value_79) => {
1854
+ let execution_38;
1855
+ const result_5 = value_79;
1856
+ execution_38 = (new Execution$1((result_5.tag === 1) ? compare(result_5.fields[0], 0n) : (() => {
1857
+ throw new Exception("Expected int. (Parameter \'comparer\')");
1858
+ })(), defaultOf()));
1859
+ const continuation_58 = continuation_57;
1860
+ return Execution$1__get_IsImmediate(execution_38) ? continuation_58(execution_38.Value) : execution_38.Resume(continuation_58);
1861
+ });
1862
+ }
1863
+ });
1864
+ }
1865
+ }), values_13);
1866
+ if (Execution$1__get_IsImmediate(body_47)) {
1867
+ return new Execution$1(new Value(/* VList */ 5, [body_47.Value]), defaultOf());
1868
+ }
1869
+ else {
1870
+ return new Execution$1(defaultOf(), (continuation_60) => {
1871
+ const execution_41 = body_47;
1872
+ if (Execution$1__get_IsImmediate(execution_41)) {
1873
+ const execution_40 = new Execution$1(new Value(/* VList */ 5, [execution_41.Value]), defaultOf());
1874
+ const continuation_61 = continuation_60;
1875
+ if (Execution$1__get_IsImmediate(execution_40)) {
1876
+ return continuation_61(execution_40.Value);
1877
+ }
1878
+ else {
1879
+ return execution_40.Resume(continuation_61);
1880
+ }
1881
+ }
1882
+ else {
1883
+ return execution_41.Resume((value_82) => {
1884
+ const execution_40 = new Execution$1(new Value(/* VList */ 5, [value_82]), defaultOf());
1885
+ const continuation_61 = continuation_60;
1886
+ return Execution$1__get_IsImmediate(execution_40) ? continuation_61(execution_40.Value) : execution_40.Resume(continuation_61);
1887
+ });
1888
+ }
1889
+ });
1890
+ }
1891
+ }
1892
+ case 15: {
1893
+ const body_53 = Execution_map((value_83) => {
1894
+ const body_49 = apply(callback_13, value_83);
1895
+ if (Execution$1__get_IsImmediate(body_49)) {
1896
+ const key = body_49.Value;
1897
+ compareKey(key, key);
1898
+ return new Execution$1(new Value(/* VTuple */ 6, [ofArray([key, value_83])]), defaultOf());
1899
+ }
1900
+ else {
1901
+ return new Execution$1(defaultOf(), (continuation_63) => {
1902
+ const execution_43 = body_49;
1903
+ if (Execution$1__get_IsImmediate(execution_43)) {
1904
+ let execution_42;
1905
+ const key = execution_43.Value;
1906
+ compareKey(key, key);
1907
+ execution_42 = (new Execution$1(new Value(/* VTuple */ 6, [ofArray([key, value_83])]), defaultOf()));
1908
+ const continuation_64 = continuation_63;
1909
+ if (Execution$1__get_IsImmediate(execution_42)) {
1910
+ return continuation_64(execution_42.Value);
1911
+ }
1912
+ else {
1913
+ return execution_42.Resume(continuation_64);
1914
+ }
1915
+ }
1916
+ else {
1917
+ return execution_43.Resume((value_87) => {
1918
+ let execution_42;
1919
+ const key = value_87;
1920
+ compareKey(key, key);
1921
+ execution_42 = (new Execution$1(new Value(/* VTuple */ 6, [ofArray([key, value_83])]), defaultOf()));
1922
+ const continuation_64 = continuation_63;
1923
+ return Execution$1__get_IsImmediate(execution_42) ? continuation_64(execution_42.Value) : execution_42.Resume(continuation_64);
1924
+ });
1925
+ }
1926
+ });
1927
+ }
1928
+ }, values_14);
1929
+ if (Execution$1__get_IsImmediate(body_53)) {
1930
+ const body_51 = sort((left_4) => ((right_4) => {
1931
+ let matchResult_4, a_7, b_7;
1932
+ if (left_4.tag === 6) {
1933
+ if (!isEmpty(left_4.fields[0])) {
1934
+ if (!isEmpty(tail_7(left_4.fields[0]))) {
1935
+ if (isEmpty(tail_7(tail_7(left_4.fields[0])))) {
1936
+ if (right_4.tag === 6) {
1937
+ if (!isEmpty(right_4.fields[0])) {
1938
+ if (!isEmpty(tail_7(right_4.fields[0]))) {
1939
+ if (isEmpty(tail_7(tail_7(right_4.fields[0])))) {
1940
+ matchResult_4 = 0;
1941
+ a_7 = head_3(left_4.fields[0]);
1942
+ b_7 = head_3(right_4.fields[0]);
1943
+ }
1944
+ else {
1945
+ matchResult_4 = 1;
1946
+ }
1947
+ }
1948
+ else {
1949
+ matchResult_4 = 1;
1950
+ }
1951
+ }
1952
+ else {
1953
+ matchResult_4 = 1;
1954
+ }
1955
+ }
1956
+ else {
1957
+ matchResult_4 = 1;
1958
+ }
1959
+ }
1960
+ else {
1961
+ matchResult_4 = 1;
1962
+ }
1963
+ }
1964
+ else {
1965
+ matchResult_4 = 1;
1966
+ }
1967
+ }
1968
+ else {
1969
+ matchResult_4 = 1;
1970
+ }
1971
+ }
1972
+ else {
1973
+ matchResult_4 = 1;
1974
+ }
1975
+ switch (matchResult_4) {
1976
+ case 0:
1977
+ return new Execution$1(compareKey(a_7, b_7), defaultOf());
1978
+ default:
1979
+ throw new Exception("Expected decorated value.");
1980
+ }
1981
+ }), body_53.Value);
1982
+ if (Execution$1__get_IsImmediate(body_51)) {
1983
+ return new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
1984
+ let matchResult_5, value_89;
1985
+ if (_arg_26.tag === 6) {
1986
+ if (!isEmpty(_arg_26.fields[0])) {
1987
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
1988
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
1989
+ matchResult_5 = 0;
1990
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
1991
+ }
1992
+ else {
1993
+ matchResult_5 = 1;
1994
+ }
1995
+ }
1996
+ else {
1997
+ matchResult_5 = 1;
1998
+ }
1999
+ }
2000
+ else {
2001
+ matchResult_5 = 1;
2002
+ }
2003
+ }
2004
+ else {
2005
+ matchResult_5 = 1;
2006
+ }
2007
+ switch (matchResult_5) {
2008
+ case 0:
2009
+ return value_89;
2010
+ default:
2011
+ throw new Exception("Expected decorated value.");
2012
+ }
2013
+ }, body_51.Value)]), defaultOf());
2014
+ }
2015
+ else {
2016
+ return new Execution$1(defaultOf(), (continuation_66) => {
2017
+ const execution_45 = body_51;
2018
+ if (Execution$1__get_IsImmediate(execution_45)) {
2019
+ const execution_44 = new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
2020
+ let matchResult_6, value_89;
2021
+ if (_arg_26.tag === 6) {
2022
+ if (!isEmpty(_arg_26.fields[0])) {
2023
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
2024
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
2025
+ matchResult_6 = 0;
2026
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
2027
+ }
2028
+ else {
2029
+ matchResult_6 = 1;
2030
+ }
2031
+ }
2032
+ else {
2033
+ matchResult_6 = 1;
2034
+ }
2035
+ }
2036
+ else {
2037
+ matchResult_6 = 1;
2038
+ }
2039
+ }
2040
+ else {
2041
+ matchResult_6 = 1;
2042
+ }
2043
+ switch (matchResult_6) {
2044
+ case 0:
2045
+ return value_89;
2046
+ default:
2047
+ throw new Exception("Expected decorated value.");
2048
+ }
2049
+ }, execution_45.Value)]), defaultOf());
2050
+ const continuation_67 = continuation_66;
2051
+ if (Execution$1__get_IsImmediate(execution_44)) {
2052
+ return continuation_67(execution_44.Value);
2053
+ }
2054
+ else {
2055
+ return execution_44.Resume(continuation_67);
2056
+ }
2057
+ }
2058
+ else {
2059
+ return execution_45.Resume((value_92) => {
2060
+ const execution_44 = new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
2061
+ let matchResult_7, value_89;
2062
+ if (_arg_26.tag === 6) {
2063
+ if (!isEmpty(_arg_26.fields[0])) {
2064
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
2065
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
2066
+ matchResult_7 = 0;
2067
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
2068
+ }
2069
+ else {
2070
+ matchResult_7 = 1;
2071
+ }
2072
+ }
2073
+ else {
2074
+ matchResult_7 = 1;
2075
+ }
2076
+ }
2077
+ else {
2078
+ matchResult_7 = 1;
2079
+ }
2080
+ }
2081
+ else {
2082
+ matchResult_7 = 1;
2083
+ }
2084
+ switch (matchResult_7) {
2085
+ case 0:
2086
+ return value_89;
2087
+ default:
2088
+ throw new Exception("Expected decorated value.");
2089
+ }
2090
+ }, value_92)]), defaultOf());
2091
+ const continuation_67 = continuation_66;
2092
+ return Execution$1__get_IsImmediate(execution_44) ? continuation_67(execution_44.Value) : execution_44.Resume(continuation_67);
2093
+ });
2094
+ }
2095
+ });
2096
+ }
2097
+ }
2098
+ else {
2099
+ return new Execution$1(defaultOf(), (continuation_69) => {
2100
+ const execution_47 = body_53;
2101
+ if (Execution$1__get_IsImmediate(execution_47)) {
2102
+ let execution_46;
2103
+ const body_51 = sort((left_4) => ((right_4) => {
2104
+ let matchResult_8, a_7, b_7;
2105
+ if (left_4.tag === 6) {
2106
+ if (!isEmpty(left_4.fields[0])) {
2107
+ if (!isEmpty(tail_7(left_4.fields[0]))) {
2108
+ if (isEmpty(tail_7(tail_7(left_4.fields[0])))) {
2109
+ if (right_4.tag === 6) {
2110
+ if (!isEmpty(right_4.fields[0])) {
2111
+ if (!isEmpty(tail_7(right_4.fields[0]))) {
2112
+ if (isEmpty(tail_7(tail_7(right_4.fields[0])))) {
2113
+ matchResult_8 = 0;
2114
+ a_7 = head_3(left_4.fields[0]);
2115
+ b_7 = head_3(right_4.fields[0]);
2116
+ }
2117
+ else {
2118
+ matchResult_8 = 1;
2119
+ }
2120
+ }
2121
+ else {
2122
+ matchResult_8 = 1;
2123
+ }
2124
+ }
2125
+ else {
2126
+ matchResult_8 = 1;
2127
+ }
2128
+ }
2129
+ else {
2130
+ matchResult_8 = 1;
2131
+ }
2132
+ }
2133
+ else {
2134
+ matchResult_8 = 1;
2135
+ }
2136
+ }
2137
+ else {
2138
+ matchResult_8 = 1;
2139
+ }
2140
+ }
2141
+ else {
2142
+ matchResult_8 = 1;
2143
+ }
2144
+ }
2145
+ else {
2146
+ matchResult_8 = 1;
2147
+ }
2148
+ switch (matchResult_8) {
2149
+ case 0:
2150
+ return new Execution$1(compareKey(a_7, b_7), defaultOf());
2151
+ default:
2152
+ throw new Exception("Expected decorated value.");
2153
+ }
2154
+ }), execution_47.Value);
2155
+ execution_46 = (Execution$1__get_IsImmediate(body_51) ? (new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
2156
+ let matchResult_9, value_89;
2157
+ if (_arg_26.tag === 6) {
2158
+ if (!isEmpty(_arg_26.fields[0])) {
2159
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
2160
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
2161
+ matchResult_9 = 0;
2162
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
2163
+ }
2164
+ else {
2165
+ matchResult_9 = 1;
2166
+ }
2167
+ }
2168
+ else {
2169
+ matchResult_9 = 1;
2170
+ }
2171
+ }
2172
+ else {
2173
+ matchResult_9 = 1;
2174
+ }
2175
+ }
2176
+ else {
2177
+ matchResult_9 = 1;
2178
+ }
2179
+ switch (matchResult_9) {
2180
+ case 0:
2181
+ return value_89;
2182
+ default:
2183
+ throw new Exception("Expected decorated value.");
2184
+ }
2185
+ }, body_51.Value)]), defaultOf())) : (new Execution$1(defaultOf(), (continuation_66) => {
2186
+ const execution_45 = body_51;
2187
+ if (Execution$1__get_IsImmediate(execution_45)) {
2188
+ const execution_44 = new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
2189
+ let matchResult_10, value_89;
2190
+ if (_arg_26.tag === 6) {
2191
+ if (!isEmpty(_arg_26.fields[0])) {
2192
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
2193
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
2194
+ matchResult_10 = 0;
2195
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
2196
+ }
2197
+ else {
2198
+ matchResult_10 = 1;
2199
+ }
2200
+ }
2201
+ else {
2202
+ matchResult_10 = 1;
2203
+ }
2204
+ }
2205
+ else {
2206
+ matchResult_10 = 1;
2207
+ }
2208
+ }
2209
+ else {
2210
+ matchResult_10 = 1;
2211
+ }
2212
+ switch (matchResult_10) {
2213
+ case 0:
2214
+ return value_89;
2215
+ default:
2216
+ throw new Exception("Expected decorated value.");
2217
+ }
2218
+ }, execution_45.Value)]), defaultOf());
2219
+ const continuation_67 = continuation_66;
2220
+ if (Execution$1__get_IsImmediate(execution_44)) {
2221
+ return continuation_67(execution_44.Value);
2222
+ }
2223
+ else {
2224
+ return execution_44.Resume(continuation_67);
2225
+ }
2226
+ }
2227
+ else {
2228
+ return execution_45.Resume((value_92) => {
2229
+ const execution_44 = new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
2230
+ let matchResult_11, value_89;
2231
+ if (_arg_26.tag === 6) {
2232
+ if (!isEmpty(_arg_26.fields[0])) {
2233
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
2234
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
2235
+ matchResult_11 = 0;
2236
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
2237
+ }
2238
+ else {
2239
+ matchResult_11 = 1;
2240
+ }
2241
+ }
2242
+ else {
2243
+ matchResult_11 = 1;
2244
+ }
2245
+ }
2246
+ else {
2247
+ matchResult_11 = 1;
2248
+ }
2249
+ }
2250
+ else {
2251
+ matchResult_11 = 1;
2252
+ }
2253
+ switch (matchResult_11) {
2254
+ case 0:
2255
+ return value_89;
2256
+ default:
2257
+ throw new Exception("Expected decorated value.");
2258
+ }
2259
+ }, value_92)]), defaultOf());
2260
+ const continuation_67 = continuation_66;
2261
+ return Execution$1__get_IsImmediate(execution_44) ? continuation_67(execution_44.Value) : execution_44.Resume(continuation_67);
2262
+ });
2263
+ }
2264
+ })));
2265
+ const continuation_70 = continuation_69;
2266
+ if (Execution$1__get_IsImmediate(execution_46)) {
2267
+ return continuation_70(execution_46.Value);
2268
+ }
2269
+ else {
2270
+ return execution_46.Resume(continuation_70);
2271
+ }
2272
+ }
2273
+ else {
2274
+ return execution_47.Resume((value_93) => {
2275
+ let execution_46;
2276
+ const body_51 = sort((left_4) => ((right_4) => {
2277
+ let matchResult_12, a_7, b_7;
2278
+ if (left_4.tag === 6) {
2279
+ if (!isEmpty(left_4.fields[0])) {
2280
+ if (!isEmpty(tail_7(left_4.fields[0]))) {
2281
+ if (isEmpty(tail_7(tail_7(left_4.fields[0])))) {
2282
+ if (right_4.tag === 6) {
2283
+ if (!isEmpty(right_4.fields[0])) {
2284
+ if (!isEmpty(tail_7(right_4.fields[0]))) {
2285
+ if (isEmpty(tail_7(tail_7(right_4.fields[0])))) {
2286
+ matchResult_12 = 0;
2287
+ a_7 = head_3(left_4.fields[0]);
2288
+ b_7 = head_3(right_4.fields[0]);
2289
+ }
2290
+ else {
2291
+ matchResult_12 = 1;
2292
+ }
2293
+ }
2294
+ else {
2295
+ matchResult_12 = 1;
2296
+ }
2297
+ }
2298
+ else {
2299
+ matchResult_12 = 1;
2300
+ }
2301
+ }
2302
+ else {
2303
+ matchResult_12 = 1;
2304
+ }
2305
+ }
2306
+ else {
2307
+ matchResult_12 = 1;
2308
+ }
2309
+ }
2310
+ else {
2311
+ matchResult_12 = 1;
2312
+ }
2313
+ }
2314
+ else {
2315
+ matchResult_12 = 1;
2316
+ }
2317
+ }
2318
+ else {
2319
+ matchResult_12 = 1;
2320
+ }
2321
+ switch (matchResult_12) {
2322
+ case 0:
2323
+ return new Execution$1(compareKey(a_7, b_7), defaultOf());
2324
+ default:
2325
+ throw new Exception("Expected decorated value.");
2326
+ }
2327
+ }), value_93);
2328
+ execution_46 = (Execution$1__get_IsImmediate(body_51) ? (new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
2329
+ let matchResult_13, value_89;
2330
+ if (_arg_26.tag === 6) {
2331
+ if (!isEmpty(_arg_26.fields[0])) {
2332
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
2333
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
2334
+ matchResult_13 = 0;
2335
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
2336
+ }
2337
+ else {
2338
+ matchResult_13 = 1;
2339
+ }
2340
+ }
2341
+ else {
2342
+ matchResult_13 = 1;
2343
+ }
2344
+ }
2345
+ else {
2346
+ matchResult_13 = 1;
2347
+ }
2348
+ }
2349
+ else {
2350
+ matchResult_13 = 1;
2351
+ }
2352
+ switch (matchResult_13) {
2353
+ case 0:
2354
+ return value_89;
2355
+ default:
2356
+ throw new Exception("Expected decorated value.");
2357
+ }
2358
+ }, body_51.Value)]), defaultOf())) : (new Execution$1(defaultOf(), (continuation_66) => {
2359
+ const execution_45 = body_51;
2360
+ if (Execution$1__get_IsImmediate(execution_45)) {
2361
+ const execution_44 = new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
2362
+ let matchResult_14, value_89;
2363
+ if (_arg_26.tag === 6) {
2364
+ if (!isEmpty(_arg_26.fields[0])) {
2365
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
2366
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
2367
+ matchResult_14 = 0;
2368
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
2369
+ }
2370
+ else {
2371
+ matchResult_14 = 1;
2372
+ }
2373
+ }
2374
+ else {
2375
+ matchResult_14 = 1;
2376
+ }
2377
+ }
2378
+ else {
2379
+ matchResult_14 = 1;
2380
+ }
2381
+ }
2382
+ else {
2383
+ matchResult_14 = 1;
2384
+ }
2385
+ switch (matchResult_14) {
2386
+ case 0:
2387
+ return value_89;
2388
+ default:
2389
+ throw new Exception("Expected decorated value.");
2390
+ }
2391
+ }, execution_45.Value)]), defaultOf());
2392
+ const continuation_67 = continuation_66;
2393
+ if (Execution$1__get_IsImmediate(execution_44)) {
2394
+ return continuation_67(execution_44.Value);
2395
+ }
2396
+ else {
2397
+ return execution_44.Resume(continuation_67);
2398
+ }
2399
+ }
2400
+ else {
2401
+ return execution_45.Resume((value_92) => {
2402
+ const execution_44 = new Execution$1(new Value(/* VList */ 5, [map((_arg_26) => {
2403
+ let matchResult_15, value_89;
2404
+ if (_arg_26.tag === 6) {
2405
+ if (!isEmpty(_arg_26.fields[0])) {
2406
+ if (!isEmpty(tail_7(_arg_26.fields[0]))) {
2407
+ if (isEmpty(tail_7(tail_7(_arg_26.fields[0])))) {
2408
+ matchResult_15 = 0;
2409
+ value_89 = head_3(tail_7(_arg_26.fields[0]));
2410
+ }
2411
+ else {
2412
+ matchResult_15 = 1;
2413
+ }
2414
+ }
2415
+ else {
2416
+ matchResult_15 = 1;
2417
+ }
2418
+ }
2419
+ else {
2420
+ matchResult_15 = 1;
2421
+ }
2422
+ }
2423
+ else {
2424
+ matchResult_15 = 1;
2425
+ }
2426
+ switch (matchResult_15) {
2427
+ case 0:
2428
+ return value_89;
2429
+ default:
2430
+ throw new Exception("Expected decorated value.");
2431
+ }
2432
+ }, value_92)]), defaultOf());
2433
+ const continuation_67 = continuation_66;
2434
+ return Execution$1__get_IsImmediate(execution_44) ? continuation_67(execution_44.Value) : execution_44.Resume(continuation_67);
2435
+ });
2436
+ }
2437
+ })));
2438
+ const continuation_70 = continuation_69;
2439
+ return Execution$1__get_IsImmediate(execution_46) ? continuation_70(execution_46.Value) : execution_46.Resume(continuation_70);
2440
+ });
2441
+ }
2442
+ });
2443
+ }
2444
+ }
2445
+ case 16: {
2446
+ const body_57 = Execution_fold((groups, value_94) => {
2447
+ const body_55 = apply(callback_14, value_94);
2448
+ if (Execution$1__get_IsImmediate(body_55)) {
2449
+ const key_1 = body_55.Value;
2450
+ const insert = (_arg_28) => {
2451
+ if (!isEmpty(_arg_28)) {
2452
+ if (equal(key_1, head_3(_arg_28)[0])) {
2453
+ return cons([head_3(_arg_28)[0], cons(value_94, head_3(_arg_28)[1])], tail_7(_arg_28));
2454
+ }
2455
+ else {
2456
+ return cons(head_3(_arg_28), insert(tail_7(_arg_28)));
2457
+ }
2458
+ }
2459
+ else {
2460
+ return singleton([key_1, singleton(value_94)]);
2461
+ }
2462
+ };
2463
+ return new Execution$1(insert(groups), defaultOf());
2464
+ }
2465
+ else {
2466
+ return new Execution$1(defaultOf(), (continuation_72) => {
2467
+ const execution_49 = body_55;
2468
+ if (Execution$1__get_IsImmediate(execution_49)) {
2469
+ let execution_48;
2470
+ const key_1 = execution_49.Value;
2471
+ const insert = (_arg_28) => {
2472
+ if (!isEmpty(_arg_28)) {
2473
+ if (equal(key_1, head_3(_arg_28)[0])) {
2474
+ return cons([head_3(_arg_28)[0], cons(value_94, head_3(_arg_28)[1])], tail_7(_arg_28));
2475
+ }
2476
+ else {
2477
+ return cons(head_3(_arg_28), insert(tail_7(_arg_28)));
2478
+ }
2479
+ }
2480
+ else {
2481
+ return singleton([key_1, singleton(value_94)]);
2482
+ }
2483
+ };
2484
+ execution_48 = (new Execution$1(insert(groups), defaultOf()));
2485
+ const continuation_73 = continuation_72;
2486
+ if (Execution$1__get_IsImmediate(execution_48)) {
2487
+ return continuation_73(execution_48.Value);
2488
+ }
2489
+ else {
2490
+ return execution_48.Resume(continuation_73);
2491
+ }
2492
+ }
2493
+ else {
2494
+ return execution_49.Resume((value_97) => {
2495
+ let execution_48;
2496
+ const key_1 = value_97;
2497
+ const insert = (_arg_28) => {
2498
+ if (!isEmpty(_arg_28)) {
2499
+ if (equal(key_1, head_3(_arg_28)[0])) {
2500
+ return cons([head_3(_arg_28)[0], cons(value_94, head_3(_arg_28)[1])], tail_7(_arg_28));
2501
+ }
2502
+ else {
2503
+ return cons(head_3(_arg_28), insert(tail_7(_arg_28)));
2504
+ }
2505
+ }
2506
+ else {
2507
+ return singleton([key_1, singleton(value_94)]);
2508
+ }
2509
+ };
2510
+ execution_48 = (new Execution$1(insert(groups), defaultOf()));
2511
+ const continuation_73 = continuation_72;
2512
+ return Execution$1__get_IsImmediate(execution_48) ? continuation_73(execution_48.Value) : execution_48.Resume(continuation_73);
2513
+ });
2514
+ }
2515
+ });
2516
+ }
2517
+ }, empty(), values_15);
2518
+ if (Execution$1__get_IsImmediate(body_57)) {
2519
+ return new Execution$1(new Value(/* VList */ 5, [map((tupledArg_4) => {
2520
+ const key_2 = tupledArg_4[0];
2521
+ const items_8 = tupledArg_4[1];
2522
+ switch (name) {
2523
+ case "List.countBy":
2524
+ return new Value(/* VTuple */ 6, [ofArray([key_2, new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(length(items_8)))])])]);
2525
+ case "List.groupBy":
2526
+ return new Value(/* VTuple */ 6, [ofArray([key_2, new Value(/* VList */ 5, [reverse(items_8)])])]);
2527
+ default:
2528
+ return last(items_8);
2529
+ }
2530
+ }, body_57.Value)]), defaultOf());
2531
+ }
2532
+ else {
2533
+ return new Execution$1(defaultOf(), (continuation_75) => {
2534
+ const execution_51 = body_57;
2535
+ if (Execution$1__get_IsImmediate(execution_51)) {
2536
+ const execution_50 = new Execution$1(new Value(/* VList */ 5, [map((tupledArg_4) => {
2537
+ const key_2 = tupledArg_4[0];
2538
+ const items_8 = tupledArg_4[1];
2539
+ switch (name) {
2540
+ case "List.countBy":
2541
+ return new Value(/* VTuple */ 6, [ofArray([key_2, new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(length(items_8)))])])]);
2542
+ case "List.groupBy":
2543
+ return new Value(/* VTuple */ 6, [ofArray([key_2, new Value(/* VList */ 5, [reverse(items_8)])])]);
2544
+ default:
2545
+ return last(items_8);
2546
+ }
2547
+ }, execution_51.Value)]), defaultOf());
2548
+ const continuation_76 = continuation_75;
2549
+ if (Execution$1__get_IsImmediate(execution_50)) {
2550
+ return continuation_76(execution_50.Value);
2551
+ }
2552
+ else {
2553
+ return execution_50.Resume(continuation_76);
2554
+ }
2555
+ }
2556
+ else {
2557
+ return execution_51.Resume((value_100) => {
2558
+ const execution_50 = new Execution$1(new Value(/* VList */ 5, [map((tupledArg_4) => {
2559
+ const key_2 = tupledArg_4[0];
2560
+ const items_8 = tupledArg_4[1];
2561
+ switch (name) {
2562
+ case "List.countBy":
2563
+ return new Value(/* VTuple */ 6, [ofArray([key_2, new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(length(items_8)))])])]);
2564
+ case "List.groupBy":
2565
+ return new Value(/* VTuple */ 6, [ofArray([key_2, new Value(/* VList */ 5, [reverse(items_8)])])]);
2566
+ default:
2567
+ return last(items_8);
2568
+ }
2569
+ }, value_100)]), defaultOf());
2570
+ const continuation_76 = continuation_75;
2571
+ return Execution$1__get_IsImmediate(execution_50) ? continuation_76(execution_50.Value) : execution_50.Resume(continuation_76);
2572
+ });
2573
+ }
2574
+ });
2575
+ }
2576
+ }
2577
+ case 17:
2578
+ return new Execution$1(new Value(/* VList */ 5, [map((arg) => keyValue(arg[0]), toList_1(values_16))]), defaultOf());
2579
+ case 18:
2580
+ return new Execution$1(new Value(/* VList */ 5, [map((tuple_1) => tuple_1[1], toList_1(values_17))]), defaultOf());
2581
+ case 19:
2582
+ return new Execution$1(new Value(/* VList */ 5, [map((tupledArg_5) => (new Value(/* VTuple */ 6, [ofArray([keyValue(tupledArg_5[0]), tupledArg_5[1]])])), toList_1(values_18))]), defaultOf());
2583
+ case 20: {
2584
+ const wanted_1 = name === "Map.forall";
2585
+ const loop = (_arg_31_mut) => {
2586
+ loop:
2587
+ while (true) {
2588
+ const _arg_31 = _arg_31_mut;
2589
+ if (!isEmpty(_arg_31)) {
2590
+ const tail_6 = tail_7(_arg_31);
2591
+ const body_60 = apply2(callback_15, keyValue(head_3(_arg_31)[0]), head_3(_arg_31)[1]);
2592
+ if (Execution$1__get_IsImmediate(body_60)) {
2593
+ const result_8 = body_60.Value;
2594
+ if (boolValue(result_8) !== wanted_1) {
2595
+ return new Execution$1(boolValue(result_8), defaultOf());
2596
+ }
2597
+ else {
2598
+ _arg_31_mut = tail_6;
2599
+ continue loop;
2600
+ }
2601
+ }
2602
+ else {
2603
+ return new Execution$1(false, (continuation_78) => {
2604
+ const execution_53 = body_60;
2605
+ if (Execution$1__get_IsImmediate(execution_53)) {
2606
+ let execution_52;
2607
+ const result_8 = execution_53.Value;
2608
+ execution_52 = ((boolValue(result_8) !== wanted_1) ? (new Execution$1(boolValue(result_8), defaultOf())) : loop(tail_6));
2609
+ const continuation_79 = continuation_78;
2610
+ if (Execution$1__get_IsImmediate(execution_52)) {
2611
+ return continuation_79(execution_52.Value);
2612
+ }
2613
+ else {
2614
+ return execution_52.Resume(continuation_79);
2615
+ }
2616
+ }
2617
+ else {
2618
+ return execution_53.Resume((value_112) => {
2619
+ let execution_52;
2620
+ const result_8 = value_112;
2621
+ execution_52 = ((boolValue(result_8) !== wanted_1) ? (new Execution$1(boolValue(result_8), defaultOf())) : loop(tail_6));
2622
+ const continuation_79 = continuation_78;
2623
+ return Execution$1__get_IsImmediate(execution_52) ? continuation_79(execution_52.Value) : execution_52.Resume(continuation_79);
2624
+ });
2625
+ }
2626
+ });
2627
+ }
2628
+ }
2629
+ else {
2630
+ return new Execution$1(wanted_1, defaultOf());
2631
+ }
2632
+ break;
2633
+ }
2634
+ };
2635
+ const body_62 = loop(toList_1(values_19));
2636
+ if (Execution$1__get_IsImmediate(body_62)) {
2637
+ return new Execution$1(new Value(/* VBool */ 3, [body_62.Value]), defaultOf());
2638
+ }
2639
+ else {
2640
+ return new Execution$1(defaultOf(), (continuation_81) => {
2641
+ const execution_55 = body_62;
2642
+ if (Execution$1__get_IsImmediate(execution_55)) {
2643
+ const execution_54 = new Execution$1(new Value(/* VBool */ 3, [execution_55.Value]), defaultOf());
2644
+ const continuation_82 = continuation_81;
2645
+ if (Execution$1__get_IsImmediate(execution_54)) {
2646
+ return continuation_82(execution_54.Value);
2647
+ }
2648
+ else {
2649
+ return execution_54.Resume(continuation_82);
2650
+ }
2651
+ }
2652
+ else {
2653
+ return execution_55.Resume((value_115) => {
2654
+ const execution_54 = new Execution$1(new Value(/* VBool */ 3, [value_115]), defaultOf());
2655
+ const continuation_82 = continuation_81;
2656
+ return Execution$1__get_IsImmediate(execution_54) ? continuation_82(execution_54.Value) : execution_54.Resume(continuation_82);
2657
+ });
2658
+ }
2659
+ });
2660
+ }
2661
+ }
2662
+ case 21: {
2663
+ const key_6 = mapKey(key_5);
2664
+ const body_64 = apply(callback_16, new Value(/* VOption */ 9, [tryFind(key_6, values_20)]));
2665
+ if (Execution$1__get_IsImmediate(body_64)) {
2666
+ const next_3 = body_64.Value;
2667
+ return new Execution$1((next_3.tag === 9) ? ((next_3.fields[0] != null) ? ((value_116 = next_3.fields[0], new Value(/* VMap */ 8, [add(key_6, value_116, values_20)]))) : (new Value(/* VMap */ 8, [remove(key_6, values_20)]))) : (() => {
2668
+ throw new Exception("Expected option. (Parameter \'updater\')");
2669
+ })(), defaultOf());
2670
+ }
2671
+ else {
2672
+ return new Execution$1(defaultOf(), (continuation_84) => {
2673
+ let value_116;
2674
+ const execution_57 = body_64;
2675
+ if (Execution$1__get_IsImmediate(execution_57)) {
2676
+ let execution_56;
2677
+ const next_3 = execution_57.Value;
2678
+ execution_56 = (new Execution$1((next_3.tag === 9) ? ((next_3.fields[0] != null) ? ((value_116 = next_3.fields[0], new Value(/* VMap */ 8, [add(key_6, value_116, values_20)]))) : (new Value(/* VMap */ 8, [remove(key_6, values_20)]))) : (() => {
2679
+ throw new Exception("Expected option. (Parameter \'updater\')");
2680
+ })(), defaultOf()));
2681
+ const continuation_85 = continuation_84;
2682
+ if (Execution$1__get_IsImmediate(execution_56)) {
2683
+ return continuation_85(execution_56.Value);
2684
+ }
2685
+ else {
2686
+ return execution_56.Resume(continuation_85);
2687
+ }
2688
+ }
2689
+ else {
2690
+ return execution_57.Resume((value_119) => {
2691
+ let value_116;
2692
+ let execution_56;
2693
+ const next_3 = value_119;
2694
+ execution_56 = (new Execution$1((next_3.tag === 9) ? ((next_3.fields[0] != null) ? ((value_116 = next_3.fields[0], new Value(/* VMap */ 8, [add(key_6, value_116, values_20)]))) : (new Value(/* VMap */ 8, [remove(key_6, values_20)]))) : (() => {
2695
+ throw new Exception("Expected option. (Parameter \'updater\')");
2696
+ })(), defaultOf()));
2697
+ const continuation_85 = continuation_84;
2698
+ return Execution$1__get_IsImmediate(execution_56) ? continuation_85(execution_56.Value) : execution_56.Resume(continuation_85);
2699
+ });
2700
+ }
2701
+ });
2702
+ }
2703
+ }
2704
+ case 22: {
2705
+ const body_68 = Execution_fold((state_4, tupledArg_6) => {
2706
+ const key_7 = tupledArg_6[0];
2707
+ const value_120 = tupledArg_6[1];
2708
+ const matchValue_3 = tryFind(key_7, state_4);
2709
+ if (matchValue_3 != null) {
2710
+ const previous = matchValue_3;
2711
+ let body_66;
2712
+ const c = value_120;
2713
+ const body_5 = apply2(callback_17, keyValue(key_7), previous);
2714
+ body_66 = (Execution$1__get_IsImmediate(body_5) ? apply(body_5.Value, c) : (new Execution$1(defaultOf(), (continuation_3) => {
2715
+ const execution_3 = body_5;
2716
+ if (Execution$1__get_IsImmediate(execution_3)) {
2717
+ const execution_2 = apply(execution_3.Value, c);
2718
+ const continuation_4 = continuation_3;
2719
+ if (Execution$1__get_IsImmediate(execution_2)) {
2720
+ return continuation_4(execution_2.Value);
2721
+ }
2722
+ else {
2723
+ return execution_2.Resume(continuation_4);
2724
+ }
2725
+ }
2726
+ else {
2727
+ return execution_3.Resume((value_1) => {
2728
+ const execution_2 = apply(value_1, c);
2729
+ const continuation_4 = continuation_3;
2730
+ return Execution$1__get_IsImmediate(execution_2) ? continuation_4(execution_2.Value) : execution_2.Resume(continuation_4);
2731
+ });
2732
+ }
2733
+ })));
2734
+ if (Execution$1__get_IsImmediate(body_66)) {
2735
+ return new Execution$1(add(key_7, body_66.Value, state_4), defaultOf());
2736
+ }
2737
+ else {
2738
+ return new Execution$1(defaultOf(), (continuation_87) => {
2739
+ const execution_59 = body_66;
2740
+ if (Execution$1__get_IsImmediate(execution_59)) {
2741
+ const execution_58 = new Execution$1(add(key_7, execution_59.Value, state_4), defaultOf());
2742
+ const continuation_88 = continuation_87;
2743
+ if (Execution$1__get_IsImmediate(execution_58)) {
2744
+ return continuation_88(execution_58.Value);
2745
+ }
2746
+ else {
2747
+ return execution_58.Resume(continuation_88);
2748
+ }
2749
+ }
2750
+ else {
2751
+ return execution_59.Resume((value_125) => {
2752
+ const execution_58 = new Execution$1(add(key_7, value_125, state_4), defaultOf());
2753
+ const continuation_88 = continuation_87;
2754
+ return Execution$1__get_IsImmediate(execution_58) ? continuation_88(execution_58.Value) : execution_58.Resume(continuation_88);
2755
+ });
2756
+ }
2757
+ });
2758
+ }
2759
+ }
2760
+ else {
2761
+ return new Execution$1(add(key_7, value_120, state_4), defaultOf());
2762
+ }
2763
+ }, left_5, toList_1(right_5));
2764
+ if (Execution$1__get_IsImmediate(body_68)) {
2765
+ return new Execution$1(new Value(/* VMap */ 8, [body_68.Value]), defaultOf());
2766
+ }
2767
+ else {
2768
+ return new Execution$1(defaultOf(), (continuation_90) => {
2769
+ const execution_61 = body_68;
2770
+ if (Execution$1__get_IsImmediate(execution_61)) {
2771
+ const execution_60 = new Execution$1(new Value(/* VMap */ 8, [execution_61.Value]), defaultOf());
2772
+ const continuation_91 = continuation_90;
2773
+ if (Execution$1__get_IsImmediate(execution_60)) {
2774
+ return continuation_91(execution_60.Value);
2775
+ }
2776
+ else {
2777
+ return execution_60.Resume(continuation_91);
2778
+ }
2779
+ }
2780
+ else {
2781
+ return execution_61.Resume((value_128) => {
2782
+ const execution_60 = new Execution$1(new Value(/* VMap */ 8, [value_128]), defaultOf());
2783
+ const continuation_91 = continuation_90;
2784
+ return Execution$1__get_IsImmediate(execution_60) ? continuation_91(execution_60.Value) : execution_60.Resume(continuation_91);
2785
+ });
2786
+ }
2787
+ });
2788
+ }
2789
+ }
2790
+ case 23:
2791
+ return apply(callback_18, value_129);
2792
+ case 24:
2793
+ return new Execution$1(new Value(/* VOption */ 9, [undefined]), defaultOf());
2794
+ case 25:
2795
+ return new Execution$1(value_132, defaultOf());
2796
+ case 26:
2797
+ return new Execution$1(new Value(/* VOption */ 9, [undefined]), defaultOf());
2798
+ case 27: {
2799
+ const body_71 = predicate(callback_19, value_137);
2800
+ if (Execution$1__get_IsImmediate(body_71)) {
2801
+ return new Execution$1(new Value(/* VOption */ 9, [body_71.Value ? value_137 : undefined]), defaultOf());
2802
+ }
2803
+ else {
2804
+ return new Execution$1(defaultOf(), (continuation_93) => {
2805
+ const execution_63 = body_71;
2806
+ if (Execution$1__get_IsImmediate(execution_63)) {
2807
+ const execution_62 = new Execution$1(new Value(/* VOption */ 9, [execution_63.Value ? value_137 : undefined]), defaultOf());
2808
+ const continuation_94 = continuation_93;
2809
+ if (Execution$1__get_IsImmediate(execution_62)) {
2810
+ return continuation_94(execution_62.Value);
2811
+ }
2812
+ else {
2813
+ return execution_62.Resume(continuation_94);
2814
+ }
2815
+ }
2816
+ else {
2817
+ return execution_63.Resume((value_140) => {
2818
+ const execution_62 = new Execution$1(new Value(/* VOption */ 9, [value_140 ? value_137 : undefined]), defaultOf());
2819
+ const continuation_94 = continuation_93;
2820
+ return Execution$1__get_IsImmediate(execution_62) ? continuation_94(execution_62.Value) : execution_62.Resume(continuation_94);
2821
+ });
2822
+ }
2823
+ });
2824
+ }
2825
+ }
2826
+ case 28:
2827
+ return new Execution$1(new Value(/* VOption */ 9, [undefined]), defaultOf());
2828
+ case 29:
2829
+ return new Execution$1(fallback, defaultOf());
2830
+ case 30:
2831
+ return apply(callback_20, Value.VUnit);
2832
+ case 31:
2833
+ return new Execution$1(value_145, defaultOf());
2834
+ case 32: {
2835
+ const body_74 = apply2(callback_21, left_6, right_6);
2836
+ if (Execution$1__get_IsImmediate(body_74)) {
2837
+ return new Execution$1(new Value(/* VOption */ 9, [body_74.Value]), defaultOf());
2838
+ }
2839
+ else {
2840
+ return new Execution$1(defaultOf(), (continuation_96) => {
2841
+ const execution_65 = body_74;
2842
+ if (Execution$1__get_IsImmediate(execution_65)) {
2843
+ const execution_64 = new Execution$1(new Value(/* VOption */ 9, [execution_65.Value]), defaultOf());
2844
+ const continuation_97 = continuation_96;
2845
+ if (Execution$1__get_IsImmediate(execution_64)) {
2846
+ return continuation_97(execution_64.Value);
2847
+ }
2848
+ else {
2849
+ return execution_64.Resume(continuation_97);
2850
+ }
2851
+ }
2852
+ else {
2853
+ return execution_65.Resume((value_150) => {
2854
+ const execution_64 = new Execution$1(new Value(/* VOption */ 9, [value_150]), defaultOf());
2855
+ const continuation_97 = continuation_96;
2856
+ return Execution$1__get_IsImmediate(execution_64) ? continuation_97(execution_64.Value) : execution_64.Resume(continuation_97);
2857
+ });
2858
+ }
2859
+ });
2860
+ }
2861
+ }
2862
+ case 33:
2863
+ return new Execution$1(new Value(/* VOption */ 9, [undefined]), defaultOf());
2864
+ case 34:
2865
+ return new Execution$1(new Value(/* VList */ 5, [ofArray(toArray(value_153))]), defaultOf());
2866
+ default:
2867
+ return new Execution$1(invokeScalar(name, arguments$), defaultOf());
2868
+ }
2869
+ }
2870
+