• R/O
  • HTTP
  • SSH
  • HTTPS

Thun: Commit

Interpreter and library.


Commit MetaInfo

Révisionc130026895b5f450aaa765d13040ca46a4eaca8d (tree)
l'heure2022-10-15 13:01:18
AuteurSimon Forman <sforman@hush...>
CommiterSimon Forman

Message de Log

Mostly done with addition and subtraction.

Change Summary

Modification

--- a/docs/notebooks/BigInts.ipynb
+++ b/docs/notebooks/BigInts.ipynb
@@ -21,15 +21,7 @@
2121 "execution_count": 1,
2222 "id": "08a49b81",
2323 "metadata": {},
24- "outputs": [
25- {
26- "name": "stdout",
27- "output_type": "stream",
28- "text": [
29- "2147483648"
30- ]
31- }
32- ],
24+ "outputs": [],
3325 "source": [
3426 "1 31 << "
3527 ]
@@ -47,13 +39,7 @@
4739 "execution_count": 2,
4840 "id": "b34d58ef",
4941 "metadata": {},
50- "outputs": [
51- {
52- "name": "stdout",
53- "output_type": "stream",
54- "text": []
55- }
56- ],
42+ "outputs": [],
5743 "source": [
5844 "unit [base] swoncat inscribe"
5945 ]
@@ -79,13 +65,7 @@
7965 "execution_count": 3,
8066 "id": "35476eac",
8167 "metadata": {},
82- "outputs": [
83- {
84- "name": "stdout",
85- "output_type": "stream",
86- "text": []
87- }
88- ],
68+ "outputs": [],
8969 "source": [
9070 "[valid_digit [0 >] [base <] &&] inscribe"
9171 ]
@@ -95,15 +75,7 @@
9575 "execution_count": 4,
9676 "id": "02a48806",
9777 "metadata": {},
98- "outputs": [
99- {
100- "name": "stdout",
101- "output_type": "stream",
102- "text": [
103- "32 true 1232147483648 false"
104- ]
105- }
106- ],
78+ "outputs": [],
10779 "source": [
10880 "32 valid_digit 1232147483648 valid_digit"
10981 ]
@@ -113,13 +85,7 @@
11385 "execution_count": 5,
11486 "id": "03a8fe65",
11587 "metadata": {},
116- "outputs": [
117- {
118- "name": "stdout",
119- "output_type": "stream",
120- "text": []
121- }
122- ],
88+ "outputs": [],
12389 "source": [
12490 "clear"
12591 ]
@@ -146,15 +112,7 @@
146112 "execution_count": 6,
147113 "id": "3fc98ccd",
148114 "metadata": {},
149- "outputs": [
150- {
151- "name": "stdout",
152- "output_type": "stream",
153- "text": [
154- "1797196498 5748904729"
155- ]
156- }
157- ],
115+ "outputs": [],
158116 "source": [
159117 "12345678901234567890 base divmod swap"
160118 ]
@@ -164,15 +122,7 @@
164122 "execution_count": 7,
165123 "id": "b838c4cb",
166124 "metadata": {},
167- "outputs": [
168- {
169- "name": "stdout",
170- "output_type": "stream",
171- "text": [
172- "1797196498 1453937433 2"
173- ]
174- }
175- ],
125+ "outputs": [],
176126 "source": [
177127 "base divmod swap"
178128 ]
@@ -182,15 +132,7 @@
182132 "execution_count": 8,
183133 "id": "42c9d92d",
184134 "metadata": {},
185- "outputs": [
186- {
187- "name": "stdout",
188- "output_type": "stream",
189- "text": [
190- "1797196498 1453937433 2 0"
191- ]
192- }
193- ],
135+ "outputs": [],
194136 "source": [
195137 "base divmod swap"
196138 ]
@@ -210,15 +152,7 @@
210152 "execution_count": 9,
211153 "id": "faaac9d6",
212154 "metadata": {},
213- "outputs": [
214- {
215- "name": "stdout",
216- "output_type": "stream",
217- "text": [
218- "1312754386 1501085485 57659106 105448366 58"
219- ]
220- }
221- ],
155+ "outputs": [],
222156 "source": [
223157 "clear 1234567890123456789012345678901234567890\n",
224158 "\n",
@@ -238,15 +172,7 @@
238172 "execution_count": 10,
239173 "id": "2a613f36",
240174 "metadata": {},
241- "outputs": [
242- {
243- "name": "stdout",
244- "output_type": "stream",
245- "text": [
246- "[58 105448366 57659106 1501085485 1312754386]"
247- ]
248- }
249- ],
175+ "outputs": [],
250176 "source": [
251177 "clear [1234567890123456789012345678901234567890]\n",
252178 "\n",
@@ -435,7 +361,7 @@
435361 "id": "c89e6054",
436362 "metadata": {},
437363 "source": [
438- "#### `to_bigint`"
364+ "#### `to-bigint`"
439365 ]
440366 },
441367 {
@@ -451,7 +377,7 @@
451377 }
452378 ],
453379 "source": [
454- "[to_bigint [!-] [abs digitalize] cleave cons] inscribe"
380+ "[to-bigint [!-] [abs digitalize] cleave cons] inscribe"
455381 ]
456382 },
457383 {
@@ -477,7 +403,7 @@
477403 }
478404 ],
479405 "source": [
480- "clear 1234567890123456789012345678901234567890 to_bigint"
406+ "clear 1234567890123456789012345678901234567890 to-bigint"
481407 ]
482408 },
483409 {
@@ -503,7 +429,7 @@
503429 }
504430 ],
505431 "source": [
506- "clear -1234567890123456789012345678901234567890 to_bigint"
432+ "clear -1234567890123456789012345678901234567890 to-bigint"
507433 ]
508434 },
509435 {
@@ -653,7 +579,7 @@
653579 "id": "7497680b",
654580 "metadata": {},
655581 "source": [
656- "#### `prep` and `from_bigint'`"
582+ "#### `prep` and `from-bigint'`"
657583 ]
658584 },
659585 {
@@ -672,7 +598,7 @@
672598 ],
673599 "source": [
674600 "[prep rest 1 0 rolldown] inscribe\n",
675- "[from_bigint' [F] step popd] inscribe\n",
601+ "[from-bigint' [F] step popd] inscribe\n",
676602 "[F [G] [H] clop popdd] inscribe\n",
677603 "[G popop base *] inscribe\n",
678604 "[H rolldown * +] inscribe"
@@ -695,7 +621,7 @@
695621 "source": [
696622 "clear 1 0 [1312754386 1501085485 57659106 105448366 58]\n",
697623 "\n",
698- "from_bigint'"
624+ "from-bigint'"
699625 ]
700626 },
701627 {
@@ -713,7 +639,7 @@
713639 }
714640 ],
715641 "source": [
716- "to_bigint"
642+ "to-bigint"
717643 ]
718644 },
719645 {
@@ -749,7 +675,7 @@
749675 }
750676 ],
751677 "source": [
752- "from_bigint'"
678+ "from-bigint'"
753679 ]
754680 },
755681 {
@@ -767,7 +693,7 @@
767693 }
768694 ],
769695 "source": [
770- "to_bigint prep from_bigint'"
696+ "to-bigint prep from-bigint'"
771697 ]
772698 },
773699 {
@@ -811,7 +737,7 @@
811737 }
812738 ],
813739 "source": [
814- "to_bigint prep from_bigint'"
740+ "to-bigint prep from-bigint'"
815741 ]
816742 },
817743 {
@@ -837,7 +763,7 @@
837763 }
838764 ],
839765 "source": [
840- "to_bigint"
766+ "to-bigint"
841767 ]
842768 },
843769 {
@@ -863,7 +789,7 @@
863789 }
864790 ],
865791 "source": [
866- "[first] [prep from_bigint'] cleave"
792+ "[first] [prep from-bigint'] cleave"
867793 ]
868794 },
869795 {
@@ -899,9 +825,9 @@
899825 "source": [
900826 "This gives:\n",
901827 "\n",
902- " foo == [first] [prep from_bigint'] cleave\n",
828+ " foo == [first] [prep from-bigint'] cleave\n",
903829 " bar == swap [] [neg] branch\n",
904- " from_bigint == foo bar"
830+ " from-bigint == foo bar"
905831 ]
906832 },
907833 {
@@ -909,7 +835,7 @@
909835 "id": "8bffedec",
910836 "metadata": {},
911837 "source": [
912- "#### `from_bigint`"
838+ "#### `from-bigint`"
913839 ]
914840 },
915841 {
@@ -926,9 +852,9 @@
926852 ],
927853 "source": [
928854 "clear\n",
929- "[foo [first] [prep from_bigint'] cleave] inscribe\n",
855+ "[foo [first] [prep from-bigint'] cleave] inscribe\n",
930856 "[bar swap [neg] [] branch] inscribe\n",
931- "[from_bigint foo bar] inscribe"
857+ "[from-bigint foo bar] inscribe"
932858 ]
933859 },
934860 {
@@ -946,7 +872,7 @@
946872 }
947873 ],
948874 "source": [
949- "1234567890123456789012345678901234567890 to_bigint from_bigint"
875+ "1234567890123456789012345678901234567890 to-bigint from-bigint"
950876 ]
951877 },
952878 {
@@ -964,7 +890,7 @@
964890 }
965891 ],
966892 "source": [
967- "neg to_bigint from_bigint"
893+ "neg to-bigint from-bigint"
968894 ]
969895 },
970896 {
@@ -992,7 +918,7 @@
992918 "\n",
993919 "Let's figure out how to add two lists of digits (we will assume that the signs are the same.) We need to put an inital `false` value for a carry flag, and then there's a `genrec`.\n",
994920 "\n",
995- " initial-carry ≡ false rollup\n",
921+ " initial-carry == false rollup\n",
996922 " add-digits' ≡ [P] [THEN] [R0] [R1] genrec\n",
997923 " \n",
998924 " add-digits ≡ initial-carry add-digits'"
@@ -1278,7 +1204,7 @@
12781204 "id": "223cee8e",
12791205 "metadata": {},
12801206 "source": [
1281- "#### `bool_to_int`"
1207+ "#### `bool-to-int`"
12821208 ]
12831209 },
12841210 {
@@ -1296,7 +1222,7 @@
12961222 "source": [
12971223 "clear\n",
12981224 "\n",
1299- "[bool_to_int [0] [1] branch] inscribe"
1225+ "[bool-to-int [0] [1] branch] inscribe"
13001226 ]
13011227 },
13021228 {
@@ -1322,8 +1248,8 @@
13221248 }
13231249 ],
13241250 "source": [
1325- "false bool_to_int\n",
1326- "true bool_to_int"
1251+ "false bool-to-int\n",
1252+ "true bool-to-int"
13271253 ]
13281254 },
13291255 {
@@ -1351,7 +1277,7 @@
13511277 "source": [
13521278 "clear\n",
13531279 "\n",
1354- "false 1 2 [bool_to_int] dipd + +"
1280+ "false 1 2 [bool-to-int] dipd + +"
13551281 ]
13561282 },
13571283 {
@@ -1371,7 +1297,7 @@
13711297 "source": [
13721298 "clear\n",
13731299 "\n",
1374- "true 1 2 [bool_to_int] dipd + +"
1300+ "true 1 2 [bool-to-int] dipd + +"
13751301 ]
13761302 },
13771303 {
@@ -1379,7 +1305,7 @@
13791305 "id": "89b971c9",
13801306 "metadata": {},
13811307 "source": [
1382- "So the first part of `F` is `[bool_to_int] dipd + +` to get the total, then we need to do\n",
1308+ "So the first part of `F` is `[bool-to-int] dipd + +` to get the total, then we need to do\n",
13831309 "\n",
13841310 "`base mod` to get the new digit and `base >=` to get the new carry flag:"
13851311 ]
@@ -1433,7 +1359,7 @@
14331359 "source": [
14341360 "Put it all together and we have:\n",
14351361 "\n",
1436- " _add-with-carry0 ≡ [bool_to_int] dipd + +\n",
1362+ " _add-with-carry0 ≡ [bool-to-int] dipd + +\n",
14371363 " _add-with-carry1 ≡ base [mod] [>=] clop\n",
14381364 "\n",
14391365 " add-with-carry ≡ _add-with-carry0 _add-with-carry1\n"
@@ -1461,7 +1387,7 @@
14611387 ],
14621388 "source": [
14631389 "clear\n",
1464- "[_add-with-carry0 [bool_to_int] dipd + +] inscribe\n",
1390+ "[_add-with-carry0 [bool-to-int] dipd + +] inscribe\n",
14651391 "[_add-with-carry1 base [mod] [>=] clop] inscribe\n",
14661392 "[add-with-carry _add-with-carry0 _add-with-carry1] inscribe"
14671393 ]
@@ -1556,7 +1482,7 @@
15561482 },
15571483 {
15581484 "cell_type": "code",
1559- "execution_count": 91,
1485+ "execution_count": 57,
15601486 "id": "b46a62ba",
15611487 "metadata": {},
15621488 "outputs": [
@@ -2257,7 +2183,7 @@
22572183 "source": [
22582184 "clear\n",
22592185 "\n",
2260- "123 to_bigint 456 to_bigint"
2186+ "123 to-bigint 456 to-bigint"
22612187 ]
22622188 },
22632189 {
@@ -2295,7 +2221,7 @@
22952221 "source": [
22962222 "clear\n",
22972223 "\n",
2298- "123 to_bigint 456 to_bigint"
2224+ "123 to-bigint 456 to-bigint"
22992225 ]
23002226 },
23012227 {
@@ -2413,7 +2339,7 @@
24132339 }
24142340 ],
24152341 "source": [
2416- "base -- to_bigint"
2342+ "base -- to-bigint"
24172343 ]
24182344 },
24192345 {
@@ -2436,8 +2362,8 @@
24362362 },
24372363 {
24382364 "cell_type": "code",
2439- "execution_count": 95,
2440- "id": "d8832fda",
2365+ "execution_count": 90,
2366+ "id": "dac1c858",
24412367 "metadata": {},
24422368 "outputs": [
24432369 {
@@ -2560,7 +2486,7 @@
25602486 },
25612487 {
25622488 "cell_type": "markdown",
2563- "id": "fdc6fc09",
2489+ "id": "184f6b2e",
25642490 "metadata": {},
25652491 "source": [
25662492 "But this doesn't go quite far enough, I think.\n",
@@ -2570,7 +2496,7 @@
25702496 },
25712497 {
25722498 "cell_type": "markdown",
2573- "id": "94249f95",
2499+ "id": "7598e48c",
25742500 "metadata": {},
25752501 "source": [
25762502 "I think `R0` will pretty much always do:\n",
@@ -2580,7 +2506,7 @@
25802506 },
25812507 {
25822508 "cell_type": "markdown",
2583- "id": "ecc190e3",
2509+ "id": "b721354e",
25842510 "metadata": {},
25852511 "source": [
25862512 "And so it should be refactored further to something like:\n",
@@ -2619,7 +2545,7 @@
26192545 },
26202546 {
26212547 "cell_type": "markdown",
2622- "id": "c9fd7e21",
2548+ "id": "aa6e7586",
26232549 "metadata": {},
26242550 "source": [
26252551 "Let's figure out the new form.\n",
@@ -2642,7 +2568,7 @@
26422568 },
26432569 {
26442570 "cell_type": "markdown",
2645- "id": "64118784",
2571+ "id": "0a5e4669",
26462572 "metadata": {},
26472573 "source": [
26482574 "Let's not over think it.\n",
@@ -2653,7 +2579,7 @@
26532579 },
26542580 {
26552581 "cell_type": "markdown",
2656- "id": "90310271",
2582+ "id": "9d7aad63",
26572583 "metadata": {},
26582584 "source": [
26592585 "With:\n",
@@ -2665,7 +2591,7 @@
26652591 },
26662592 {
26672593 "cell_type": "code",
2668- "execution_count": 93,
2594+ "execution_count": 91,
26692595 "id": "55f64814",
26702596 "metadata": {},
26712597 "outputs": [
@@ -2681,7 +2607,7 @@
26812607 },
26822608 {
26832609 "cell_type": "code",
2684- "execution_count": 91,
2610+ "execution_count": 92,
26852611 "id": "04e2d0d0",
26862612 "metadata": {},
26872613 "outputs": [
@@ -2699,7 +2625,7 @@
26992625 },
27002626 {
27012627 "cell_type": "code",
2702- "execution_count": 92,
2628+ "execution_count": 93,
27032629 "id": "a28d9323",
27042630 "metadata": {},
27052631 "outputs": [
@@ -2717,7 +2643,7 @@
27172643 },
27182644 {
27192645 "cell_type": "markdown",
2720- "id": "e8433d46",
2646+ "id": "004b7aca",
27212647 "metadata": {},
27222648 "source": [
27232649 "So to get from \n",
@@ -2737,8 +2663,8 @@
27372663 },
27382664 {
27392665 "cell_type": "code",
2740- "execution_count": 103,
2741- "id": "77e6c03a",
2666+ "execution_count": 94,
2667+ "id": "bc16275c",
27422668 "metadata": {},
27432669 "outputs": [
27442670 {
@@ -2765,8 +2691,8 @@
27652691 },
27662692 {
27672693 "cell_type": "code",
2768- "execution_count": 104,
2769- "id": "1119f1e6",
2694+ "execution_count": 95,
2695+ "id": "c517da7a",
27702696 "metadata": {},
27712697 "outputs": [
27722698 {
@@ -2783,7 +2709,7 @@
27832709 },
27842710 {
27852711 "cell_type": "code",
2786- "execution_count": 105,
2712+ "execution_count": 96,
27872713 "id": "3f482224",
27882714 "metadata": {},
27892715 "outputs": [
@@ -2802,14 +2728,14 @@
28022728 {
28032729 "cell_type": "code",
28042730 "execution_count": null,
2805- "id": "02bfc247",
2731+ "id": "3a504505",
28062732 "metadata": {},
28072733 "outputs": [],
28082734 "source": []
28092735 },
28102736 {
28112737 "cell_type": "code",
2812- "execution_count": 106,
2738+ "execution_count": 97,
28132739 "id": "4b90e664",
28142740 "metadata": {},
28152741 "outputs": [
@@ -2831,7 +2757,7 @@
28312757 },
28322758 {
28332759 "cell_type": "markdown",
2834- "id": "089fc71c",
2760+ "id": "173bf5b7",
28352761 "metadata": {},
28362762 "source": [
28372763 "Compare the above with what we wanted:\n",
@@ -2853,15 +2779,15 @@
28532779 {
28542780 "cell_type": "code",
28552781 "execution_count": null,
2856- "id": "929366cc",
2782+ "id": "c816fa4b",
28572783 "metadata": {},
28582784 "outputs": [],
28592785 "source": []
28602786 },
28612787 {
28622788 "cell_type": "code",
2863- "execution_count": 107,
2864- "id": "a3b7e48a",
2789+ "execution_count": 98,
2790+ "id": "ff88e2c1",
28652791 "metadata": {},
28662792 "outputs": [
28672793 {
@@ -2885,8 +2811,8 @@
28852811 },
28862812 {
28872813 "cell_type": "code",
2888- "execution_count": 108,
2889- "id": "313ce113",
2814+ "execution_count": 99,
2815+ "id": "941a4426",
28902816 "metadata": {
28912817 "scrolled": true
28922818 },
@@ -2905,8 +2831,8 @@
29052831 },
29062832 {
29072833 "cell_type": "code",
2908- "execution_count": 110,
2909- "id": "aca55d10",
2834+ "execution_count": 100,
2835+ "id": "917600dd",
29102836 "metadata": {},
29112837 "outputs": [
29122838 {
@@ -2922,18 +2848,9 @@
29222848 ]
29232849 },
29242850 {
2925- "cell_type": "markdown",
2926- "id": "92a471fa",
2927- "metadata": {},
2928- "source": [
2929- " combine-two-lists == build-two-list-combiner [i cons] genrec\n",
2930- " "
2931- ]
2932- },
2933- {
29342851 "cell_type": "code",
2935- "execution_count": 111,
2936- "id": "0fa2607d",
2852+ "execution_count": 101,
2853+ "id": "21f6b0e4",
29372854 "metadata": {},
29382855 "outputs": [
29392856 {
@@ -2953,8 +2870,8 @@
29532870 },
29542871 {
29552872 "cell_type": "code",
2956- "execution_count": 112,
2957- "id": "026095a5",
2873+ "execution_count": 102,
2874+ "id": "4a8819fc",
29582875 "metadata": {},
29592876 "outputs": [
29602877 {
@@ -2971,8 +2888,8 @@
29712888 },
29722889 {
29732890 "cell_type": "code",
2974- "execution_count": 113,
2975- "id": "15974737",
2891+ "execution_count": 103,
2892+ "id": "5d451c1e",
29762893 "metadata": {},
29772894 "outputs": [
29782895 {
@@ -2989,8 +2906,8 @@
29892906 },
29902907 {
29912908 "cell_type": "code",
2992- "execution_count": 114,
2993- "id": "525bc382",
2909+ "execution_count": 104,
2910+ "id": "28fefe8a",
29942911 "metadata": {},
29952912 "outputs": [
29962913 {
@@ -3004,7 +2921,7 @@
30042921 "source": [
30052922 "clear\n",
30062923 "\n",
3007- "123456 to_bigint\n",
2924+ "123456 to-bigint\n",
30082925 "\n",
30092926 "\n",
30102927 "\n"
@@ -3012,7 +2929,7 @@
30122929 },
30132930 {
30142931 "cell_type": "code",
3015- "execution_count": 117,
2932+ "execution_count": 105,
30162933 "id": "fa37c40c",
30172934 "metadata": {},
30182935 "outputs": [
@@ -3037,20 +2954,8 @@
30372954 ]
30382955 },
30392956 {
3040- "cell_type": "markdown",
3041- "id": "5f739deb",
3042- "metadata": {},
3043- "source": [
3044- "\n",
3045- " combine-two-lists == build-two-list-combiner [i cons] genrec\n",
3046- " \n",
3047- " build-two-list-combiner == [[[ditch-empty-list] swoncat] dip [pop] swoncat] dip [uncons-two] [dipd] sandwich [[ifte] ccons [P'] swons [P] swap ] dip\n",
3048- " "
3049- ]
3050- },
3051- {
30522957 "cell_type": "code",
3053- "execution_count": 118,
2958+ "execution_count": 106,
30542959 "id": "850a1421",
30552960 "metadata": {},
30562961 "outputs": [
@@ -3079,8 +2984,8 @@
30792984 },
30802985 {
30812986 "cell_type": "code",
3082- "execution_count": 119,
3083- "id": "52bb5921",
2987+ "execution_count": 107,
2988+ "id": "4b6005fc",
30842989 "metadata": {},
30852990 "outputs": [
30862991 {
@@ -3097,7 +3002,7 @@
30973002 },
30983003 {
30993004 "cell_type": "code",
3100- "execution_count": 120,
3005+ "execution_count": 108,
31013006 "id": "c616033e",
31023007 "metadata": {},
31033008 "outputs": [
@@ -3121,7 +3026,7 @@
31213026 },
31223027 {
31233028 "cell_type": "code",
3124- "execution_count": 121,
3029+ "execution_count": 109,
31253030 "id": "1a18ddd7",
31263031 "metadata": {},
31273032 "outputs": [
@@ -3139,7 +3044,7 @@
31393044 },
31403045 {
31413046 "cell_type": "code",
3142- "execution_count": 122,
3047+ "execution_count": 110,
31433048 "id": "3c639487",
31443049 "metadata": {},
31453050 "outputs": [
@@ -3157,7 +3062,7 @@
31573062 },
31583063 {
31593064 "cell_type": "code",
3160- "execution_count": 123,
3065+ "execution_count": 111,
31613066 "id": "c9222cab",
31623067 "metadata": {},
31633068 "outputs": [
@@ -3175,7 +3080,7 @@
31753080 },
31763081 {
31773082 "cell_type": "code",
3178- "execution_count": 124,
3083+ "execution_count": 112,
31793084 "id": "f3bc8d28",
31803085 "metadata": {},
31813086 "outputs": [
@@ -3191,7 +3096,7 @@
31913096 },
31923097 {
31933098 "cell_type": "markdown",
3194- "id": "c85d6fe6",
3099+ "id": "82b7bf9a",
31953100 "metadata": {},
31963101 "source": [
31973102 "#### Demonstrate `add-bigints`"
@@ -3199,8 +3104,8 @@
31993104 },
32003105 {
32013106 "cell_type": "code",
3202- "execution_count": 125,
3203- "id": "3da6266b",
3107+ "execution_count": 113,
3108+ "id": "b4a71b70",
32043109 "metadata": {},
32053110 "outputs": [
32063111 {
@@ -3212,13 +3117,13 @@
32123117 }
32133118 ],
32143119 "source": [
3215- "1234 999 [to_bigint] ii "
3120+ "1234 999 [to-bigint] ii "
32163121 ]
32173122 },
32183123 {
32193124 "cell_type": "code",
3220- "execution_count": 126,
3221- "id": "7d38dbaa",
3125+ "execution_count": 114,
3126+ "id": "6aba84ae",
32223127 "metadata": {},
32233128 "outputs": [
32243129 {
@@ -3235,8 +3140,8 @@
32353140 },
32363141 {
32373142 "cell_type": "code",
3238- "execution_count": 127,
3239- "id": "e65f7ff9",
3143+ "execution_count": 115,
3144+ "id": "d5dc4dce",
32403145 "metadata": {},
32413146 "outputs": [
32423147 {
@@ -3248,13 +3153,13 @@
32483153 }
32493154 ],
32503155 "source": [
3251- "from_bigint"
3156+ "from-bigint"
32523157 ]
32533158 },
32543159 {
32553160 "cell_type": "code",
3256- "execution_count": 128,
3257- "id": "5d385f35",
3161+ "execution_count": 116,
3162+ "id": "2e9ab2c2",
32583163 "metadata": {},
32593164 "outputs": [
32603165 {
@@ -3271,16 +3176,24 @@
32713176 },
32723177 {
32733178 "cell_type": "code",
3274- "execution_count": null,
3275- "id": "fb7da91a",
3179+ "execution_count": 117,
3180+ "id": "080d81a3",
32763181 "metadata": {},
3277- "outputs": [],
3278- "source": []
3182+ "outputs": [
3183+ {
3184+ "name": "stdout",
3185+ "output_type": "stream",
3186+ "text": []
3187+ }
3188+ ],
3189+ "source": [
3190+ "clear"
3191+ ]
32793192 },
32803193 {
32813194 "cell_type": "code",
32823195 "execution_count": null,
3283- "id": "679e9df6",
3196+ "id": "7b237ca8",
32843197 "metadata": {},
32853198 "outputs": [],
32863199 "source": []
@@ -3288,7 +3201,7 @@
32883201 {
32893202 "cell_type": "code",
32903203 "execution_count": null,
3291- "id": "d4d2850a",
3204+ "id": "46f50f12",
32923205 "metadata": {},
32933206 "outputs": [],
32943207 "source": []
@@ -3296,7 +3209,7 @@
32963209 {
32973210 "cell_type": "code",
32983211 "execution_count": null,
3299- "id": "c4da9da4",
3212+ "id": "7e035a2c",
33003213 "metadata": {},
33013214 "outputs": [],
33023215 "source": []
@@ -3304,7 +3217,7 @@
33043217 {
33053218 "cell_type": "code",
33063219 "execution_count": null,
3307- "id": "55a37610",
3220+ "id": "f2492e55",
33083221 "metadata": {},
33093222 "outputs": [],
33103223 "source": []
@@ -3312,7 +3225,7 @@
33123225 {
33133226 "cell_type": "code",
33143227 "execution_count": null,
3315- "id": "c637a7ea",
3228+ "id": "8dfddc89",
33163229 "metadata": {},
33173230 "outputs": [],
33183231 "source": []
@@ -3320,7 +3233,7 @@
33203233 {
33213234 "cell_type": "code",
33223235 "execution_count": null,
3323- "id": "b56cf709",
3236+ "id": "7f2bf0e5",
33243237 "metadata": {},
33253238 "outputs": [],
33263239 "source": []
@@ -3370,7 +3283,7 @@
33703283 },
33713284 {
33723285 "cell_type": "code",
3373- "execution_count": 112,
3286+ "execution_count": 118,
33743287 "id": "9c50bd24",
33753288 "metadata": {},
33763289 "outputs": [
@@ -3386,7 +3299,7 @@
33863299 },
33873300 {
33883301 "cell_type": "code",
3389- "execution_count": 113,
3302+ "execution_count": 119,
33903303 "id": "4c1dbabd",
33913304 "metadata": {},
33923305 "outputs": [
@@ -3405,7 +3318,7 @@
34053318 },
34063319 {
34073320 "cell_type": "code",
3408- "execution_count": 114,
3321+ "execution_count": 120,
34093322 "id": "ef683ade",
34103323 "metadata": {},
34113324 "outputs": [
@@ -3424,7 +3337,7 @@
34243337 },
34253338 {
34263339 "cell_type": "code",
3427- "execution_count": 115,
3340+ "execution_count": 121,
34283341 "id": "ff52920a",
34293342 "metadata": {},
34303343 "outputs": [
@@ -3443,7 +3356,7 @@
34433356 },
34443357 {
34453358 "cell_type": "code",
3446- "execution_count": 116,
3359+ "execution_count": 122,
34473360 "id": "be946f53",
34483361 "metadata": {},
34493362 "outputs": [
@@ -3469,7 +3382,7 @@
34693382 },
34703383 {
34713384 "cell_type": "code",
3472- "execution_count": 117,
3385+ "execution_count": 123,
34733386 "id": "056e3072",
34743387 "metadata": {},
34753388 "outputs": [
@@ -3485,7 +3398,7 @@
34853398 },
34863399 {
34873400 "cell_type": "code",
3488- "execution_count": 118,
3401+ "execution_count": 124,
34893402 "id": "02d4e38e",
34903403 "metadata": {},
34913404 "outputs": [
@@ -3503,7 +3416,7 @@
35033416 },
35043417 {
35053418 "cell_type": "code",
3506- "execution_count": 119,
3419+ "execution_count": 125,
35073420 "id": "5683eb84",
35083421 "metadata": {},
35093422 "outputs": [
@@ -3527,7 +3440,7 @@
35273440 },
35283441 {
35293442 "cell_type": "code",
3530- "execution_count": 120,
3443+ "execution_count": 126,
35313444 "id": "a4e1f728",
35323445 "metadata": {},
35333446 "outputs": [
@@ -3551,7 +3464,7 @@
35513464 },
35523465 {
35533466 "cell_type": "code",
3554- "execution_count": 121,
3467+ "execution_count": 127,
35553468 "id": "dc7c151a",
35563469 "metadata": {},
35573470 "outputs": [
@@ -3611,7 +3524,7 @@
36113524 },
36123525 {
36133526 "cell_type": "code",
3614- "execution_count": 122,
3527+ "execution_count": 128,
36153528 "id": "50c2669a",
36163529 "metadata": {},
36173530 "outputs": [
@@ -3627,7 +3540,7 @@
36273540 },
36283541 {
36293542 "cell_type": "code",
3630- "execution_count": 123,
3543+ "execution_count": 129,
36313544 "id": "1bbf3465",
36323545 "metadata": {},
36333546 "outputs": [
@@ -3647,7 +3560,7 @@
36473560 },
36483561 {
36493562 "cell_type": "code",
3650- "execution_count": 124,
3563+ "execution_count": 130,
36513564 "id": "5a9347f6",
36523565 "metadata": {},
36533566 "outputs": [
@@ -3665,7 +3578,7 @@
36653578 },
36663579 {
36673580 "cell_type": "code",
3668- "execution_count": 125,
3581+ "execution_count": 131,
36693582 "id": "69b18847",
36703583 "metadata": {},
36713584 "outputs": [
@@ -3682,7 +3595,7 @@
36823595 },
36833596 {
36843597 "cell_type": "code",
3685- "execution_count": 126,
3598+ "execution_count": 132,
36863599 "id": "0b29370d",
36873600 "metadata": {},
36883601 "outputs": [
@@ -3702,7 +3615,7 @@
37023615 },
37033616 {
37043617 "cell_type": "code",
3705- "execution_count": 127,
3618+ "execution_count": 133,
37063619 "id": "32ce148e",
37073620 "metadata": {},
37083621 "outputs": [
@@ -3722,7 +3635,7 @@
37223635 },
37233636 {
37243637 "cell_type": "code",
3725- "execution_count": 128,
3638+ "execution_count": 134,
37263639 "id": "4efc8f76",
37273640 "metadata": {},
37283641 "outputs": [
@@ -3749,7 +3662,7 @@
37493662 "\n",
37503663 "we have three lists. The first is a possibly-empty list of pairs to compare.\n",
37513664 "\n",
3752- "THe second two are the tails of the original lists.\n",
3665+ "The second two are the tails of the original lists.\n",
37533666 "\n",
37543667 "if the first list is non-empty then the second list must be empty so the whole function should return true\n",
37553668 "\n",
@@ -3778,7 +3691,7 @@
37783691 },
37793692 {
37803693 "cell_type": "code",
3781- "execution_count": 129,
3694+ "execution_count": 135,
37823695 "id": "7d973f7f",
37833696 "metadata": {},
37843697 "outputs": [
@@ -3807,7 +3720,7 @@
38073720 },
38083721 {
38093722 "cell_type": "code",
3810- "execution_count": 130,
3723+ "execution_count": 136,
38113724 "id": "9239e0c4",
38123725 "metadata": {},
38133726 "outputs": [
@@ -3836,7 +3749,7 @@
38363749 },
38373750 {
38383751 "cell_type": "code",
3839- "execution_count": 131,
3752+ "execution_count": 137,
38403753 "id": "0c58a6e0",
38413754 "metadata": {},
38423755 "outputs": [
@@ -3892,7 +3805,7 @@
38923805 },
38933806 {
38943807 "cell_type": "code",
3895- "execution_count": 132,
3808+ "execution_count": 138,
38963809 "id": "7f302157",
38973810 "metadata": {},
38983811 "outputs": [
@@ -3912,7 +3825,7 @@
39123825 },
39133826 {
39143827 "cell_type": "code",
3915- "execution_count": 133,
3828+ "execution_count": 139,
39163829 "id": "d25ef02e",
39173830 "metadata": {},
39183831 "outputs": [
@@ -3940,7 +3853,7 @@
39403853 },
39413854 {
39423855 "cell_type": "code",
3943- "execution_count": 134,
3856+ "execution_count": 140,
39443857 "id": "06e0ffcb",
39453858 "metadata": {},
39463859 "outputs": [
@@ -3967,7 +3880,7 @@
39673880 },
39683881 {
39693882 "cell_type": "code",
3970- "execution_count": 135,
3883+ "execution_count": 141,
39713884 "id": "b2428f49",
39723885 "metadata": {},
39733886 "outputs": [
@@ -3985,7 +3898,7 @@
39853898 },
39863899 {
39873900 "cell_type": "code",
3988- "execution_count": 136,
3901+ "execution_count": 142,
39893902 "id": "4ef5f503",
39903903 "metadata": {},
39913904 "outputs": [
@@ -4011,7 +3924,7 @@
40113924 },
40123925 {
40133926 "cell_type": "code",
4014- "execution_count": 246,
3927+ "execution_count": 143,
40153928 "id": "7f060f83",
40163929 "metadata": {},
40173930 "outputs": [
@@ -4046,7 +3959,7 @@
40463959 },
40473960 {
40483961 "cell_type": "code",
4049- "execution_count": 138,
3962+ "execution_count": 144,
40503963 "id": "8d74a801",
40513964 "metadata": {},
40523965 "outputs": [
@@ -4064,7 +3977,7 @@
40643977 },
40653978 {
40663979 "cell_type": "code",
4067- "execution_count": 139,
3980+ "execution_count": 145,
40683981 "id": "0104d2b0",
40693982 "metadata": {},
40703983 "outputs": [
@@ -4072,7 +3985,7 @@
40723985 "name": "stdout",
40733986 "output_type": "stream",
40743987 "text": [
4075- "false"
3988+ "true"
40763989 ]
40773990 }
40783991 ],
@@ -4082,7 +3995,7 @@
40823995 },
40833996 {
40843997 "cell_type": "code",
4085- "execution_count": 140,
3998+ "execution_count": 146,
40863999 "id": "4728d141",
40874000 "metadata": {},
40884001 "outputs": [
@@ -4090,7 +4003,7 @@
40904003 "name": "stdout",
40914004 "output_type": "stream",
40924005 "text": [
4093- "false"
4006+ "true"
40944007 ]
40954008 }
40964009 ],
@@ -4100,7 +4013,7 @@
41004013 },
41014014 {
41024015 "cell_type": "code",
4103- "execution_count": 141,
4016+ "execution_count": 147,
41044017 "id": "bfb5e62c",
41054018 "metadata": {},
41064019 "outputs": [
@@ -4116,7 +4029,7 @@
41164029 },
41174030 {
41184031 "cell_type": "code",
4119- "execution_count": 142,
4032+ "execution_count": 148,
41204033 "id": "7983881c",
41214034 "metadata": {},
41224035 "outputs": [
@@ -4134,7 +4047,7 @@
41344047 },
41354048 {
41364049 "cell_type": "code",
4137- "execution_count": 143,
4050+ "execution_count": 149,
41384051 "id": "677757c5",
41394052 "metadata": {},
41404053 "outputs": [
@@ -4142,7 +4055,7 @@
41424055 "name": "stdout",
41434056 "output_type": "stream",
41444057 "text": [
4145- "false"
4058+ "true"
41464059 ]
41474060 }
41484061 ],
@@ -4152,7 +4065,7 @@
41524065 },
41534066 {
41544067 "cell_type": "code",
4155- "execution_count": 144,
4068+ "execution_count": 150,
41564069 "id": "5691f813",
41574070 "metadata": {},
41584071 "outputs": [
@@ -4160,7 +4073,7 @@
41604073 "name": "stdout",
41614074 "output_type": "stream",
41624075 "text": [
4163- "false"
4076+ "true"
41644077 ]
41654078 }
41664079 ],
@@ -4178,7 +4091,7 @@
41784091 },
41794092 {
41804093 "cell_type": "code",
4181- "execution_count": 145,
4094+ "execution_count": 151,
41824095 "id": "b95fe984",
41834096 "metadata": {},
41844097 "outputs": [
@@ -4207,7 +4120,7 @@
42074120 },
42084121 {
42094122 "cell_type": "code",
4210- "execution_count": 146,
4123+ "execution_count": 152,
42114124 "id": "b5ddac15",
42124125 "metadata": {},
42134126 "outputs": [
@@ -4235,7 +4148,7 @@
42354148 },
42364149 {
42374150 "cell_type": "code",
4238- "execution_count": 147,
4151+ "execution_count": 153,
42394152 "id": "d4077376",
42404153 "metadata": {},
42414154 "outputs": [
@@ -4255,7 +4168,7 @@
42554168 },
42564169 {
42574170 "cell_type": "code",
4258- "execution_count": 148,
4171+ "execution_count": 154,
42594172 "id": "ac840996",
42604173 "metadata": {},
42614174 "outputs": [
@@ -4263,7 +4176,7 @@
42634176 "name": "stdout",
42644177 "output_type": "stream",
42654178 "text": [
4266- "false"
4179+ "true"
42674180 ]
42684181 }
42694182 ],
@@ -4273,7 +4186,7 @@
42734186 },
42744187 {
42754188 "cell_type": "code",
4276- "execution_count": 149,
4189+ "execution_count": 155,
42774190 "id": "e7c3b141",
42784191 "metadata": {},
42794192 "outputs": [
@@ -4293,7 +4206,7 @@
42934206 },
42944207 {
42954208 "cell_type": "code",
4296- "execution_count": 150,
4209+ "execution_count": 156,
42974210 "id": "95c7308d",
42984211 "metadata": {},
42994212 "outputs": [
@@ -4301,7 +4214,7 @@
43014214 "name": "stdout",
43024215 "output_type": "stream",
43034216 "text": [
4304- "true"
4217+ "false"
43054218 ]
43064219 }
43074220 ],
@@ -4311,7 +4224,7 @@
43114224 },
43124225 {
43134226 "cell_type": "code",
4314- "execution_count": 151,
4227+ "execution_count": 157,
43154228 "id": "5e43ba80",
43164229 "metadata": {},
43174230 "outputs": [
@@ -4331,7 +4244,7 @@
43314244 },
43324245 {
43334246 "cell_type": "code",
4334- "execution_count": 152,
4247+ "execution_count": 158,
43354248 "id": "20070426",
43364249 "metadata": {},
43374250 "outputs": [
@@ -4339,7 +4252,7 @@
43394252 "name": "stdout",
43404253 "output_type": "stream",
43414254 "text": [
4342- "false"
4255+ "true"
43434256 ]
43444257 }
43454258 ],
@@ -4349,7 +4262,7 @@
43494262 },
43504263 {
43514264 "cell_type": "code",
4352- "execution_count": 154,
4265+ "execution_count": 159,
43534266 "id": "c97b0df9",
43544267 "metadata": {},
43554268 "outputs": [
@@ -4365,7 +4278,7 @@
43654278 },
43664279 {
43674280 "cell_type": "code",
4368- "execution_count": 155,
4281+ "execution_count": 160,
43694282 "id": "980a1bbf",
43704283 "metadata": {},
43714284 "outputs": [
@@ -4381,7 +4294,7 @@
43814294 },
43824295 {
43834296 "cell_type": "code",
4384- "execution_count": 199,
4297+ "execution_count": 161,
43854298 "id": "4f429421",
43864299 "metadata": {},
43874300 "outputs": [
@@ -4389,7 +4302,7 @@
43894302 "name": "stdout",
43904303 "output_type": "stream",
43914304 "text": [
4392- "false"
4305+ "true"
43934306 ]
43944307 }
43954308 ],
@@ -4399,7 +4312,7 @@
43994312 },
44004313 {
44014314 "cell_type": "code",
4402- "execution_count": 158,
4315+ "execution_count": 162,
44034316 "id": "5a6419ee",
44044317 "metadata": {},
44054318 "outputs": [
@@ -4407,7 +4320,7 @@
44074320 "name": "stdout",
44084321 "output_type": "stream",
44094322 "text": [
4410- "true"
4323+ "false"
44114324 ]
44124325 }
44134326 ],
@@ -4417,7 +4330,7 @@
44174330 },
44184331 {
44194332 "cell_type": "code",
4420- "execution_count": 159,
4333+ "execution_count": 163,
44214334 "id": "cd586291",
44224335 "metadata": {},
44234336 "outputs": [
@@ -4425,7 +4338,7 @@
44254338 "name": "stdout",
44264339 "output_type": "stream",
44274340 "text": [
4428- "false"
4341+ "true"
44294342 ]
44304343 }
44314344 ],
@@ -4443,7 +4356,7 @@
44434356 },
44444357 {
44454358 "cell_type": "code",
4446- "execution_count": 160,
4359+ "execution_count": 164,
44474360 "id": "35fb22d2",
44484361 "metadata": {},
44494362 "outputs": [
@@ -4451,7 +4364,7 @@
44514364 "name": "stdout",
44524365 "output_type": "stream",
44534366 "text": [
4454- "[3 2 1] [4 5 6]"
4367+ "[4 5 6] [3 2 1]"
44554368 ]
44564369 }
44574370 ],
@@ -4461,7 +4374,7 @@
44614374 },
44624375 {
44634376 "cell_type": "code",
4464- "execution_count": 161,
4377+ "execution_count": 165,
44654378 "id": "36d74e5b",
44664379 "metadata": {},
44674380 "outputs": [
@@ -4469,7 +4382,7 @@
44694382 "name": "stdout",
44704383 "output_type": "stream",
44714384 "text": [
4472- "[3 2 1] [4 5 6]"
4385+ "[4 5 6] [3 2 1]"
44734386 ]
44744387 }
44754388 ],
@@ -4495,7 +4408,7 @@
44954408 },
44964409 {
44974410 "cell_type": "code",
4498- "execution_count": 202,
4411+ "execution_count": 166,
44994412 "id": "dd645337",
45004413 "metadata": {},
45014414 "outputs": [
@@ -4512,7 +4425,7 @@
45124425 },
45134426 {
45144427 "cell_type": "code",
4515- "execution_count": 203,
4428+ "execution_count": 167,
45164429 "id": "935552d4",
45174430 "metadata": {},
45184431 "outputs": [
@@ -4530,7 +4443,7 @@
45304443 },
45314444 {
45324445 "cell_type": "code",
4533- "execution_count": 204,
4446+ "execution_count": 168,
45344447 "id": "05100765",
45354448 "metadata": {},
45364449 "outputs": [
@@ -4538,7 +4451,7 @@
45384451 "name": "stdout",
45394452 "output_type": "stream",
45404453 "text": [
4541- "true [3 2 1] [4 5 6]"
4454+ "false [4 5 6] [3 2 1]"
45424455 ]
45434456 }
45444457 ],
@@ -4548,8 +4461,8 @@
45484461 },
45494462 {
45504463 "cell_type": "code",
4551- "execution_count": 134,
4552- "id": "187c0381",
4464+ "execution_count": 169,
4465+ "id": "7ac873d4",
45534466 "metadata": {},
45544467 "outputs": [
45554468 {
@@ -4564,7 +4477,7 @@
45644477 },
45654478 {
45664479 "cell_type": "markdown",
4567- "id": "1a8a8196",
4480+ "id": "7ef0f655",
45684481 "metadata": {},
45694482 "source": [
45704483 "### Subtraction, at last...\n",
@@ -4584,7 +4497,7 @@
45844497 },
45854498 {
45864499 "cell_type": "markdown",
4587- "id": "9751fd65",
4500+ "id": "173aa582",
45884501 "metadata": {},
45894502 "source": [
45904503 "We want to use `check-gt` here:\n",
@@ -4595,7 +4508,7 @@
45954508 },
45964509 {
45974510 "cell_type": "markdown",
4598- "id": "df2ae839",
4511+ "id": "242e863f",
45994512 "metadata": {},
46004513 "source": [
46014514 "It seems we should just flip the sign bit if we swap, eh?\n",
@@ -4605,7 +4518,7 @@
46054518 },
46064519 {
46074520 "cell_type": "markdown",
4608- "id": "c775c3a4",
4521+ "id": "37ed39c6",
46094522 "metadata": {},
46104523 "source": [
46114524 "Now we subtract the digits:\n",
@@ -4629,14 +4542,14 @@
46294542 " [swap sub-carry]\n",
46304543 " [sub-with-carry]\n",
46314544 " build-two-list-combiner\n",
4632- " [i cons] genrec\n",
4545+ " genrec\n",
46334546 "\n",
46344547 "We just need to define the pieces."
46354548 ]
46364549 },
46374550 {
46384551 "cell_type": "markdown",
4639- "id": "32eeaf38",
4552+ "id": "844210e4",
46404553 "metadata": {},
46414554 "source": [
46424555 "#### `sub-with-carry`\n",
@@ -4646,14 +4559,14 @@
46464559 },
46474560 {
46484561 "cell_type": "markdown",
4649- "id": "3b47df3b",
4562+ "id": "3c10e256",
46504563 "metadata": {},
46514564 "source": [
46524565 " carry a b sub-with-carry\n",
46534566 " ------------------------------\n",
46544567 " (a-b-carry) new-carry\n",
46554568 "\n",
4656- " _sub-with-carry0 ≡ [bool_to_int] dipd - -\n",
4569+ " _sub-with-carry0 ≡ [bool-to-int] dipd - -\n",
46574570 " _sub-with-carry1 ≡ [base + base mod] [0 <] clop\n",
46584571 "\n",
46594572 " sub-with-carry ≡ _sub-with-carry0 _sub-with-carry1\n"
@@ -4661,8 +4574,8 @@
46614574 },
46624575 {
46634576 "cell_type": "code",
4664- "execution_count": 135,
4665- "id": "880dc3da",
4577+ "execution_count": 170,
4578+ "id": "c360cc7b",
46664579 "metadata": {},
46674580 "outputs": [
46684581 {
@@ -4672,15 +4585,15 @@
46724585 }
46734586 ],
46744587 "source": [
4675- "[_sub-with-carry0 rolldown bool_to_int [-] ii] inscribe\n",
4588+ "[_sub-with-carry0 rolldown bool-to-int [-] ii] inscribe\n",
46764589 "[_sub-with-carry1 [base + base mod] [0 <] cleave] inscribe\n",
46774590 "[sub-with-carry _sub-with-carry0 _sub-with-carry1] inscribe"
46784591 ]
46794592 },
46804593 {
46814594 "cell_type": "code",
4682- "execution_count": 139,
4683- "id": "bae53ad4",
4595+ "execution_count": 171,
4596+ "id": "3a84adff",
46844597 "metadata": {
46854598 "scrolled": true
46864599 },
@@ -4699,8 +4612,8 @@
46994612 },
47004613 {
47014614 "cell_type": "code",
4702- "execution_count": 140,
4703- "id": "f54d93bc",
4615+ "execution_count": 172,
4616+ "id": "0dcdc968",
47044617 "metadata": {},
47054618 "outputs": [
47064619 {
@@ -4717,8 +4630,8 @@
47174630 },
47184631 {
47194632 "cell_type": "code",
4720- "execution_count": 141,
4721- "id": "740034d8",
4633+ "execution_count": 173,
4634+ "id": "2d60492d",
47224635 "metadata": {},
47234636 "outputs": [
47244637 {
@@ -4746,7 +4659,7 @@
47464659 },
47474660 {
47484661 "cell_type": "markdown",
4749- "id": "d29e6193",
4662+ "id": "fc4ff7c6",
47504663 "metadata": {},
47514664 "source": [
47524665 "That leaves the recursive branch:\n",
@@ -4768,7 +4681,7 @@
47684681 },
47694682 {
47704683 "cell_type": "markdown",
4771- "id": "d31868ab",
4684+ "id": "984f1bf4",
47724685 "metadata": {},
47734686 "source": [
47744687 " \n",
@@ -4783,7 +4696,7 @@
47834696 },
47844697 {
47854698 "cell_type": "markdown",
4786- "id": "5c4404a8",
4699+ "id": "845abba7",
47874700 "metadata": {},
47884701 "source": [
47894702 "But there's a problem! This winds up subtracting `a` from 0 rather than the other way around:\n",
@@ -4793,16 +4706,14 @@
47934706 },
47944707 {
47954708 "cell_type": "code",
4796- "execution_count": 147,
4797- "id": "be093900",
4709+ "execution_count": 174,
4710+ "id": "20c8ad40",
47984711 "metadata": {},
47994712 "outputs": [
48004713 {
48014714 "name": "stdout",
48024715 "output_type": "stream",
4803- "text": [
4804- "[3 2 1]"
4805- ]
4716+ "text": []
48064717 }
48074718 ],
48084719 "source": [
@@ -4818,7 +4729,7 @@
48184729 },
48194730 {
48204731 "cell_type": "markdown",
4821- "id": "253538a4",
4732+ "id": "77e427f9",
48224733 "metadata": {},
48234734 "source": [
48244735 "Try it out:"
@@ -4826,8 +4737,8 @@
48264737 },
48274738 {
48284739 "cell_type": "code",
4829- "execution_count": 148,
4830- "id": "ce9f01e2",
4740+ "execution_count": 175,
4741+ "id": "92201303",
48314742 "metadata": {},
48324743 "outputs": [
48334744 {
@@ -4846,8 +4757,8 @@
48464757 },
48474758 {
48484759 "cell_type": "code",
4849- "execution_count": 160,
4850- "id": "2120af39",
4760+ "execution_count": 176,
4761+ "id": "1a1d7cdc",
48514762 "metadata": {},
48524763 "outputs": [
48534764 {
@@ -4866,8 +4777,8 @@
48664777 },
48674778 {
48684779 "cell_type": "code",
4869- "execution_count": 161,
4870- "id": "55fc1f59",
4780+ "execution_count": 177,
4781+ "id": "39ce9c6a",
48714782 "metadata": {},
48724783 "outputs": [
48734784 {
@@ -4886,8 +4797,8 @@
48864797 },
48874798 {
48884799 "cell_type": "code",
4889- "execution_count": 162,
4890- "id": "1db3eaeb",
4800+ "execution_count": 178,
4801+ "id": "a93e916e",
48914802 "metadata": {},
48924803 "outputs": [
48934804 {
@@ -4906,8 +4817,8 @@
49064817 },
49074818 {
49084819 "cell_type": "code",
4909- "execution_count": 163,
4910- "id": "ededec7b",
4820+ "execution_count": 179,
4821+ "id": "c2273ff3",
49114822 "metadata": {},
49124823 "outputs": [
49134824 {
@@ -4922,7 +4833,7 @@
49224833 },
49234834 {
49244835 "cell_type": "markdown",
4925- "id": "ffc08bef",
4836+ "id": "7c609313",
49264837 "metadata": {},
49274838 "source": [
49284839 "But what about those leading zeroes?\n",
@@ -4934,8 +4845,8 @@
49344845 },
49354846 {
49364847 "cell_type": "code",
4937- "execution_count": 165,
4938- "id": "fe557598",
4848+ "execution_count": 180,
4849+ "id": "d8c7f7a5",
49394850 "metadata": {},
49404851 "outputs": [
49414852 {
@@ -4950,56 +4861,8 @@
49504861 },
49514862 {
49524863 "cell_type": "code",
4953- "execution_count": null,
4954- "id": "f7275cd6",
4955- "metadata": {},
4956- "outputs": [],
4957- "source": []
4958- },
4959- {
4960- "cell_type": "code",
4961- "execution_count": null,
4962- "id": "740a5c97",
4963- "metadata": {},
4964- "outputs": [],
4965- "source": []
4966- },
4967- {
4968- "cell_type": "code",
4969- "execution_count": null,
4970- "id": "9ea8ba1c",
4971- "metadata": {},
4972- "outputs": [],
4973- "source": []
4974- },
4975- {
4976- "cell_type": "code",
4977- "execution_count": 164,
4978- "id": "b6c2e9ee",
4979- "metadata": {},
4980- "outputs": [
4981- {
4982- "name": "stdout",
4983- "output_type": "stream",
4984- "text": []
4985- }
4986- ],
4987- "source": [
4988- "[sub-carry-from-digits popd] inscribe"
4989- ]
4990- },
4991- {
4992- "cell_type": "markdown",
4993- "id": "32cef119",
4994- "metadata": {},
4995- "source": [
4996- " sub-carry == pop"
4997- ]
4998- },
4999- {
5000- "cell_type": "code",
5001- "execution_count": 230,
5002- "id": "c22775e9",
4864+ "execution_count": 181,
4865+ "id": "875aaafa",
50034866 "metadata": {},
50044867 "outputs": [
50054868 {
@@ -5009,350 +4872,81 @@
50094872 }
50104873 ],
50114874 "source": [
5012- "[sub-like-bigints [uncons] dip rest check-gt sub-digits cons] inscribe\n",
5013- "[sub-digits initial-carry sub-digits'] inscribe\n",
5014- "[sub-digits'\n",
5015- " [sub-carry-from-digits]\n",
5016- " [swap sub-carry]\n",
5017- " [sub-with-carry]\n",
5018- " build-two-list-combiner\n",
5019- " \n",
4875+ "[sub-carry-from-digits\n",
4876+ " [pop not]\n",
4877+ " [popd]\n",
4878+ " [_scfd_R0]\n",
4879+ " [i cons-but-not-leading-zeroes]\n",
4880+ " genrec\n",
50204881 "] inscribe"
50214882 ]
50224883 },
50234884 {
50244885 "cell_type": "code",
5025- "execution_count": 231,
5026- "id": "ac670030",
4886+ "execution_count": 182,
4887+ "id": "bd2447b6",
50274888 "metadata": {},
50284889 "outputs": [
50294890 {
50304891 "name": "stdout",
50314892 "output_type": "stream",
5032- "text": [
5033- "false [3 2 1] [6 5 4] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd]"
5034- ]
4893+ "text": []
50354894 }
50364895 ],
50374896 "source": [
5038- "clear\n",
5039- "false\n",
5040- "[3 2 1] [6 5 4]\n",
5041- "[sub-carry-from-digits]\n",
5042- " [swap sub-carry]\n",
5043- " [sub-with-carry]\n",
5044- " build-two-list-combiner"
5045- ]
5046- },
5047- {
5048- "cell_type": "code",
5049- "execution_count": null,
5050- "id": "8fbba815",
5051- "metadata": {},
5052- "outputs": [],
5053- "source": [
5054- "[i cons] genrec\n"
4897+ "[_scfd_R0 uncons 0 swap [sub-with-carry] dip] inscribe"
50554898 ]
50564899 },
50574900 {
50584901 "cell_type": "code",
5059- "execution_count": null,
5060- "id": "cce0cc68",
5061- "metadata": {},
5062- "outputs": [],
5063- "source": []
5064- },
5065- {
5066- "cell_type": "code",
5067- "execution_count": null,
5068- "id": "9163ad94",
5069- "metadata": {},
5070- "outputs": [],
5071- "source": []
5072- },
5073- {
5074- "cell_type": "code",
5075- "execution_count": null,
5076- "id": "d862f5a8",
5077- "metadata": {},
5078- "outputs": [],
5079- "source": []
5080- },
5081- {
5082- "cell_type": "code",
5083- "execution_count": null,
5084- "id": "976c4d53",
5085- "metadata": {},
5086- "outputs": [],
5087- "source": []
5088- },
5089- {
5090- "cell_type": "code",
5091- "execution_count": 212,
5092- "id": "3b05693f",
4902+ "execution_count": 183,
4903+ "id": "ffaf1fcc",
50934904 "metadata": {},
50944905 "outputs": [
50954906 {
50964907 "name": "stdout",
50974908 "output_type": "stream",
50984909 "text": [
5099- "[true 12345] [true 109]"
4910+ "[9 9]"
51004911 ]
51014912 }
51024913 ],
51034914 "source": [
51044915 "clear\n",
5105- "12345 to_bigint 109 to_bigint"
4916+ "\n",
4917+ "true [0 0 1] sub-carry-from-digits"
51064918 ]
51074919 },
51084920 {
51094921 "cell_type": "code",
5110- "execution_count": 213,
5111- "id": "fc69485b",
4922+ "execution_count": 184,
4923+ "id": "8a2b2165",
51124924 "metadata": {},
51134925 "outputs": [
51144926 {
51154927 "name": "stdout",
51164928 "output_type": "stream",
5117- "text": [
5118- "false false [109] [12345] [P] [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] uncons-two [sub-with-carry] dipd]"
5119- ]
4929+ "text": []
51204930 }
51214931 ],
51224932 "source": [
5123- "sub-like-bigints"
5124- ]
5125- },
5126- {
5127- "cell_type": "markdown",
5128- "id": "ca954866",
5129- "metadata": {},
5130- "source": [
5131- " false false [109] [12345]\n",
5132- " [P]\n",
5133- " [\n",
5134- " [P']\n",
5135- " [ditch-empty-list sub-carry-from-digits]\n",
5136- " [pop swap sub-carry]\n",
5137- " ifte\n",
5138- " ]\n",
5139- " [\n",
5140- " [uncons-two [sub-with-carry] dipd]\n",
5141- " i cons\n",
5142- " ]"
5143- ]
5144- },
5145- {
5146- "cell_type": "code",
5147- "execution_count": null,
5148- "id": "45a744b7",
5149- "metadata": {},
5150- "outputs": [],
5151- "source": [
5152- "[i cons] genrec"
4933+ "clear"
51534934 ]
51544935 },
51554936 {
51564937 "cell_type": "markdown",
5157- "id": "bc354239",
5158- "metadata": {},
5159- "source": [
5160- "- Did I redefine something?\n",
5161- "- Did a definition not make it into the dictionary?\n",
5162- "- Trace in the Notebooks should show a trace even if an exception is encountered.\n"
5163- ]
5164- },
5165- {
5166- "cell_type": "code",
5167- "execution_count": 215,
5168- "id": "9b2fd2fb",
5169- "metadata": {},
5170- "outputs": [
5171- {
5172- "name": "stdout",
5173- "output_type": "stream",
5174- "text": [
5175- "\n",
5176- "==== Help on P ====\n",
5177- "\n",
5178- "P ≡ [bool] ii & not\n",
5179- "\n",
5180- "---- end ( P )\n",
5181- "\n",
5182- "\n",
5183- "false false [109] [12345] [P] [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] uncons-two [sub-with-carry] dipd]"
5184- ]
5185- }
5186- ],
5187- "source": [
5188- "[P] help"
5189- ]
5190- },
5191- {
5192- "cell_type": "code",
5193- "execution_count": 216,
5194- "id": "3a69a1a2",
4938+ "id": "73180c15",
51954939 "metadata": {},
5196- "outputs": [
5197- {
5198- "name": "stdout",
5199- "output_type": "stream",
5200- "text": [
5201- "\n",
5202- "==== Help on P' ====\n",
5203- "\n",
5204- "P' ≡ [bool] ii |\n",
5205- "\n",
5206- "---- end ( P' )\n",
5207- "\n",
5208- "\n",
5209- "false false [109] [12345] [P] [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] uncons-two [sub-with-carry] dipd]"
5210- ]
5211- }
5212- ],
52134940 "source": [
5214- "[P'] help"
5215- ]
5216- },
5217- {
5218- "cell_type": "code",
5219- "execution_count": 224,
5220- "id": "e29a136f",
5221- "metadata": {},
5222- "outputs": [
5223- {
5224- "name": "stdout",
5225- "output_type": "stream",
5226- "text": [
5227- "false false [109] [12345]"
5228- ]
5229- }
5230- ],
5231- "source": [
5232- "pop"
5233- ]
5234- },
5235- {
5236- "cell_type": "code",
5237- "execution_count": 220,
5238- "id": "7499c430",
5239- "metadata": {},
5240- "outputs": [
5241- {
5242- "name": "stdout",
5243- "output_type": "stream",
5244- "text": [
5245- "false false [109] [12345]"
5246- ]
5247- }
5248- ],
5249- "source": [
5250- " [109] [12345] "
5251- ]
5252- },
5253- {
5254- "cell_type": "code",
5255- "execution_count": 225,
5256- "id": "1f38a3a1",
5257- "metadata": {},
5258- "outputs": [
5259- {
5260- "name": "stdout",
5261- "output_type": "stream",
5262- "text": [
5263- "false false [109] [12345] true"
5264- ]
5265- }
5266- ],
5267- "source": [
5268- "[P'] nullary\n",
5269- " "
5270- ]
5271- },
5272- {
5273- "cell_type": "code",
5274- "execution_count": 221,
5275- "id": "31103274",
5276- "metadata": {},
5277- "outputs": [
5278- {
5279- "name": "stdout",
5280- "output_type": "stream",
5281- "text": [
5282- "false false [109] [12345] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte]"
5283- ]
5284- }
5285- ],
5286- "source": [
5287- " [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte]\n",
5288- " "
5289- ]
5290- },
5291- {
5292- "cell_type": "code",
5293- "execution_count": 221,
5294- "id": "9f3e739d",
5295- "metadata": {},
5296- "outputs": [
5297- {
5298- "name": "stdout",
5299- "output_type": "stream",
5300- "text": [
5301- "false false [109] [12345] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte]"
5302- ]
5303- }
5304- ],
5305- "source": [
5306- " [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte]\n",
5307- " "
5308- ]
5309- },
5310- {
5311- "cell_type": "code",
5312- "execution_count": null,
5313- "id": "11639f03",
5314- "metadata": {},
5315- "outputs": [],
5316- "source": [
5317- " uncons-two [sub-with-carry] dipd"
4941+ "#### `sub-carry`\n",
4942+ "\n",
4943+ " sub-carry == pop"
53184944 ]
53194945 },
53204946 {
53214947 "cell_type": "code",
5322- "execution_count": null,
5323- "id": "2889ee5e",
5324- "metadata": {},
5325- "outputs": [],
5326- "source": []
5327- },
5328- {
5329- "cell_type": "code",
5330- "execution_count": null,
5331- "id": "328334db",
5332- "metadata": {},
5333- "outputs": [],
5334- "source": []
5335- },
5336- {
5337- "cell_type": "code",
5338- "execution_count": null,
5339- "id": "76e3a1ca",
5340- "metadata": {},
5341- "outputs": [],
5342- "source": []
5343- },
5344- {
5345- "cell_type": "code",
5346- "execution_count": null,
5347- "id": "93d70133",
5348- "metadata": {},
5349- "outputs": [],
5350- "source": []
5351- },
5352- {
5353- "cell_type": "code",
5354- "execution_count": 240,
5355- "id": "f2bc1f16",
4948+ "execution_count": 185,
4949+ "id": "c22775e9",
53564950 "metadata": {},
53574951 "outputs": [
53584952 {
@@ -5362,243 +4956,128 @@
53624956 }
53634957 ],
53644958 "source": [
5365- "clear"
5366- ]
5367- },
5368- {
5369- "cell_type": "code",
5370- "execution_count": 241,
5371- "id": "c404eb99",
5372- "metadata": {},
5373- "outputs": [
5374- {
5375- "name": "stdout",
5376- "output_type": "stream",
5377- "text": [
5378- "false [3 2 1] [6 5 4] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap pop] ifte] [uncons-two [sub-with-carry] dipd]"
5379- ]
5380- }
5381- ],
5382- "source": [
5383- "clear\n",
5384- "false\n",
5385- "[3 2 1] [6 5 4]\n",
5386- "[sub-carry-from-digits]\n",
4959+ "[sub-like-bigints [uncons] dip rest check-gt sub-digits cons] inscribe\n",
4960+ "[sub-digits initial-carry sub-digits'] inscribe\n",
4961+ "[sub-digits'\n",
4962+ " [sub-carry-from-digits]\n",
53874963 " [swap pop]\n",
53884964 " [sub-with-carry]\n",
5389- " build-two-list-combiner"
5390- ]
5391- },
5392- {
5393- "cell_type": "code",
5394- "execution_count": 242,
5395- "id": "74502c4c",
5396- "metadata": {},
5397- "outputs": [
5398- {
5399- "name": "stdout",
5400- "output_type": "stream",
5401- "text": [
5402- "[2147483645 2147483644 2147483644]"
5403- ]
5404- }
5405- ],
5406- "source": [
5407- "[i cons] genrec\n"
4965+ " build-two-list-combiner\n",
4966+ " genrec\n",
4967+ "] inscribe"
54084968 ]
54094969 },
54104970 {
54114971 "cell_type": "code",
5412- "execution_count": null,
5413- "id": "39a842e5",
5414- "metadata": {},
5415- "outputs": [],
5416- "source": []
5417- },
5418- {
5419- "cell_type": "code",
5420- "execution_count": 243,
5421- "id": "ecb3de02",
4972+ "execution_count": 186,
4973+ "id": "ac670030",
54224974 "metadata": {},
54234975 "outputs": [
54244976 {
54254977 "name": "stdout",
54264978 "output_type": "stream",
54274979 "text": [
5428- "false [6 5 4] [3 2 1] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap pop] ifte] [uncons-two [sub-with-carry] dipd]"
4980+ "true [3 2 1] [6 5 4]"
54294981 ]
54304982 }
54314983 ],
54324984 "source": [
54334985 "clear\n",
5434- "false\n",
5435- "[3 2 1] [6 5 4] swap\n",
5436- "[sub-carry-from-digits]\n",
5437- " [swap pop]\n",
5438- " [sub-with-carry]\n",
5439- " build-two-list-combiner"
4986+ "true [3 2 1] [6 5 4]"
54404987 ]
54414988 },
54424989 {
54434990 "cell_type": "code",
5444- "execution_count": 244,
5445- "id": "0bf21e08",
4991+ "execution_count": 187,
4992+ "id": "c19ff340",
54464993 "metadata": {},
54474994 "outputs": [
54484995 {
54494996 "name": "stdout",
54504997 "output_type": "stream",
54514998 "text": [
5452- "[3 3 3]"
4999+ "false false [6 5 4] [3 2 1]"
54535000 ]
54545001 }
54555002 ],
54565003 "source": [
5457- "[i cons] genrec\n"
5458- ]
5459- },
5460- {
5461- "cell_type": "markdown",
5462- "id": "74054f2f",
5463- "metadata": {},
5464- "source": [
5465- "That sure fucking *looks* like it works."
5004+ "check-gt initial-carry"
54665005 ]
54675006 },
54685007 {
54695008 "cell_type": "code",
5470- "execution_count": null,
5471- "id": "20462cd5",
5472- "metadata": {},
5473- "outputs": [],
5474- "source": []
5475- },
5476- {
5477- "cell_type": "code",
5478- "execution_count": 247,
5479- "id": "2ab1031c",
5009+ "execution_count": 188,
5010+ "id": "8fbba815",
54805011 "metadata": {},
54815012 "outputs": [
54825013 {
54835014 "name": "stdout",
54845015 "output_type": "stream",
54855016 "text": [
5486- "true [6 5 4] [3 2 1]"
5017+ "false [3 3 3]"
54875018 ]
54885019 }
54895020 ],
54905021 "source": [
5491- "clear\n",
5492- "false\n",
5493- "[3 2 1] [6 5 4] check-gt"
5022+ "sub-digits'"
54945023 ]
54955024 },
54965025 {
54975026 "cell_type": "code",
5498- "execution_count": 248,
5499- "id": "1b908ee7",
5027+ "execution_count": 189,
5028+ "id": "3b05693f",
55005029 "metadata": {},
55015030 "outputs": [
55025031 {
55035032 "name": "stdout",
55045033 "output_type": "stream",
55055034 "text": [
5506- "true [6 5 4] [3 2 1] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap pop] ifte] [uncons-two [sub-with-carry] dipd]"
5035+ "[true 5 4 3 2 1] [true 9 0 1]"
55075036 ]
55085037 }
55095038 ],
55105039 "source": [
5511- "[sub-carry-from-digits]\n",
5512- " [swap pop]\n",
5513- " [sub-with-carry]\n",
5514- " build-two-list-combiner"
5040+ "clear\n",
5041+ "12345 to-bigint 109 to-bigint"
55155042 ]
55165043 },
55175044 {
55185045 "cell_type": "code",
5519- "execution_count": 249,
5520- "id": "e223937e",
5046+ "execution_count": 190,
5047+ "id": "fc69485b",
55215048 "metadata": {},
55225049 "outputs": [
55235050 {
55245051 "name": "stdout",
55255052 "output_type": "stream",
55265053 "text": [
5527- "[2 3 3]"
5054+ "[true 6 3 2 2 1]"
55285055 ]
55295056 }
55305057 ],
55315058 "source": [
5532- "[i cons] genrec\n"
5059+ "sub-like-bigints"
55335060 ]
55345061 },
55355062 {
55365063 "cell_type": "code",
5537- "execution_count": 251,
5538- "id": "a5747b29",
5064+ "execution_count": 191,
5065+ "id": "c992d25a",
55395066 "metadata": {},
55405067 "outputs": [
55415068 {
55425069 "name": "stdout",
55435070 "output_type": "stream",
55445071 "text": [
5545- "-333"
5072+ "12236"
55465073 ]
55475074 }
55485075 ],
55495076 "source": [
5550- "clear 123 456 -"
5551- ]
5552- },
5553- {
5554- "cell_type": "markdown",
5555- "id": "64c14e67",
5556- "metadata": {},
5557- "source": [
5558- "Almost."
5077+ "from-bigint"
55595078 ]
55605079 },
55615080 {
5562- "cell_type": "code",
5563- "execution_count": null,
5564- "id": "c9999912",
5565- "metadata": {},
5566- "outputs": [],
5567- "source": []
5568- },
5569- {
5570- "cell_type": "code",
5571- "execution_count": null,
5572- "id": "29a0586c",
5573- "metadata": {},
5574- "outputs": [],
5575- "source": []
5576- },
5577- {
5578- "cell_type": "code",
5579- "execution_count": null,
5580- "id": "bb8cb15e",
5581- "metadata": {},
5582- "outputs": [],
5583- "source": []
5584- },
5585- {
5586- "cell_type": "code",
5587- "execution_count": null,
5588- "id": "6a5b3ace",
5589- "metadata": {},
5590- "outputs": [],
5591- "source": []
5592- },
5593- {
5594- "cell_type": "code",
5595- "execution_count": null,
5596- "id": "417e2d45",
5597- "metadata": {},
5598- "outputs": [],
5599- "source": []
5600- },
5601- {
56025081 "cell_type": "markdown",
56035082 "id": "f2b707c1",
56045083 "metadata": {},
@@ -5607,11 +5086,11 @@
56075086 "\n",
56085087 " base 2147483648\n",
56095088 " ditch-empty-list [bool] [popd] [pop] ifte\n",
5610- " bool_to_int [0] [1] branch\n",
5089+ " bool-to-int [0] [1] branch\n",
56115090 " uncons-two [uncons] ii swapd\n",
56125091 "\n",
56135092 " add-with-carry _a0 _a1\n",
5614- " _a0 [bool_to_int] dipd + +\n",
5093+ " _a0 [bool-to-int] dipd + +\n",
56155094 " _a1 base [mod] [>=] clop\n",
56165095 "\n",
56175096 " add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec\n",
--- a/implementations/bigints.joy
+++ b/implementations/bigints.joy
@@ -64,7 +64,7 @@ clear
6464
6565 [sub-carry-from-digits [pop not] [popd] [_scfd_R0] [i cons-but-not-leading-zeroes] genrec] inscribe
6666 [_scfd_R0 uncons 0 swap [sub-with-carry] dip] inscribe
67-[cons-but-not-leading-zeroes [[bool] ii | not] [popd] [cons] ifte]
67+[cons-but-not-leading-zeroes [P'] [cons] [popd] ifte]
6868
6969 [sub-with-carry _sub-with-carry0 _sub-with-carry1]
7070 [_sub-with-carry0 rolldown bool-to-int [-] ii]
@@ -92,6 +92,3 @@ build-two-list-combiner
9292 inscribe
9393
9494
95-true [0 1] sub-carry-from-digits
96-
97-
Afficher sur ancien navigateur de dépôt.