OSDN Git Service

83d126f4e15aac00e3f89d39a08ef67541f0f74a
[joypy/Thun.git] / docs / Zipper.ipynb
1 {
2  "cells": [
3   {
4    "cell_type": "markdown",
5    "metadata": {},
6    "source": [
7     "# Traversing Datastructures with Zippers\n",
8     "This notebook is about using the \"zipper\" with joy datastructures.  See the [Zipper wikipedia entry](https://en.wikipedia.org/wiki/Zipper_%28data_structure%29) or the original paper: [\"FUNCTIONAL PEARL The Zipper\" by Gérard Huet](https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf)\n",
9     "\n",
10     "\n",
11     "Given a datastructure on the stack we can navigate through it, modify it, and rebuild it using the \"zipper\" technique."
12    ]
13   },
14   {
15    "cell_type": "markdown",
16    "metadata": {},
17    "source": [
18     "## Trees\n",
19     "In Joypy there aren't any complex datastructures, just ints, floats, strings, Symbols (strings that are names of functions) and sequences (aka lists, aka quoted literals, aka aggregates, etc...), but we can build [trees](https://en.wikipedia.org/wiki/Tree_%28data_structure%29) out of sequences."
20    ]
21   },
22   {
23    "cell_type": "code",
24    "execution_count": 1,
25    "metadata": {},
26    "outputs": [
27     {
28      "name": "stdout",
29      "output_type": "stream",
30      "text": [
31       "[1 [2 [3 4 25 6] 7] 8]"
32      ]
33     }
34    ],
35    "source": [
36     "[1 [2 [3 4 25 6] 7] 8]"
37    ]
38   },
39   {
40    "cell_type": "markdown",
41    "metadata": {},
42    "source": [
43     "## Zipper in Joy\n",
44     "Zippers work by keeping track of the current item, the already-seen items, and the yet-to-be seen items as you traverse a datastructure (the datastructure used to keep track of these items is the zipper.)\n",
45     "\n",
46     "In Joy we can do this with the following words:\n",
47     "\n",
48     "    z-down == [] swap uncons swap\n",
49     "    z-up == swons swap shunt\n",
50     "    z-right == [swons] cons dip uncons swap\n",
51     "    z-left == swons [uncons swap] dip swap\n",
52     "\n",
53     "Let's use them to change 25 into 625.  The first time a word is used I show the trace so you can see how it works.  If we were going to use these a lot it would make sense to write Python versions for efficiency, but see below."
54    ]
55   },
56   {
57    "cell_type": "code",
58    "execution_count": 2,
59    "metadata": {},
60    "outputs": [
61     {
62      "name": "stdout",
63      "output_type": "stream",
64      "text": [
65       "[1 [2 [3 4 25 6] 7] 8]"
66      ]
67     }
68    ],
69    "source": [
70     "[z-down [] swap uncons swap] inscribe\n",
71     "[z-up swons swap shunt] inscribe\n",
72     "[z-right [swons] cons dip uncons swap] inscribe\n",
73     "[z-left swons [uncons swap] dip swap] inscribe"
74    ]
75   },
76   {
77    "cell_type": "code",
78    "execution_count": 3,
79    "metadata": {},
80    "outputs": [
81     {
82      "name": "stdout",
83      "output_type": "stream",
84      "text": [
85       "   [1 [2 [3 4 25 6] 7] 8] • z-down\n",
86       "   [1 [2 [3 4 25 6] 7] 8] • [] swap uncons swap\n",
87       "[1 [2 [3 4 25 6] 7] 8] [] • swap uncons swap\n",
88       "[] [1 [2 [3 4 25 6] 7] 8] • uncons swap\n",
89       "[] 1 [[2 [3 4 25 6] 7] 8] • swap\n",
90       "[] [[2 [3 4 25 6] 7] 8] 1 • \n",
91       "\n",
92       "[] [[2 [3 4 25 6] 7] 8] 1"
93      ]
94     }
95    ],
96    "source": [
97     "[z-down] trace"
98    ]
99   },
100   {
101    "cell_type": "code",
102    "execution_count": 4,
103    "metadata": {},
104    "outputs": [
105     {
106      "name": "stdout",
107      "output_type": "stream",
108      "text": [
109       "        [] [[2 [3 4 25 6] 7] 8] 1 • z-right\n",
110       "        [] [[2 [3 4 25 6] 7] 8] 1 • [swons] cons dip uncons swap\n",
111       "[] [[2 [3 4 25 6] 7] 8] 1 [swons] • cons dip uncons swap\n",
112       "[] [[2 [3 4 25 6] 7] 8] [1 swons] • dip uncons swap\n",
113       "                               [] • 1 swons [[2 [3 4 25 6] 7] 8] uncons swap\n",
114       "                             [] 1 • swons [[2 [3 4 25 6] 7] 8] uncons swap\n",
115       "                              [1] • [[2 [3 4 25 6] 7] 8] uncons swap\n",
116       "         [1] [[2 [3 4 25 6] 7] 8] • uncons swap\n",
117       "         [1] [2 [3 4 25 6] 7] [8] • swap\n",
118       "         [1] [8] [2 [3 4 25 6] 7] • \n",
119       "\n",
120       "[1] [8] [2 [3 4 25 6] 7]"
121      ]
122     }
123    ],
124    "source": [
125     "[z-right] trace"
126    ]
127   },
128   {
129    "cell_type": "code",
130    "execution_count": 5,
131    "metadata": {},
132    "outputs": [
133     {
134      "name": "stdout",
135      "output_type": "stream",
136      "text": [
137       "[1] [8] [] [[3 4 25 6] 7] 2"
138      ]
139     }
140    ],
141    "source": [
142     "z-down"
143    ]
144   },
145   {
146    "cell_type": "code",
147    "execution_count": 6,
148    "metadata": {},
149    "outputs": [
150     {
151      "name": "stdout",
152      "output_type": "stream",
153      "text": [
154       "[1] [8] [2] [7] [3 4 25 6]"
155      ]
156     }
157    ],
158    "source": [
159     "z-right"
160    ]
161   },
162   {
163    "cell_type": "code",
164    "execution_count": 7,
165    "metadata": {},
166    "outputs": [
167     {
168      "name": "stdout",
169      "output_type": "stream",
170      "text": [
171       "[1] [8] [2] [7] [] [4 25 6] 3"
172      ]
173     }
174    ],
175    "source": [
176     "z-down"
177    ]
178   },
179   {
180    "cell_type": "code",
181    "execution_count": 8,
182    "metadata": {},
183    "outputs": [
184     {
185      "name": "stdout",
186      "output_type": "stream",
187      "text": [
188       "[1] [8] [2] [7] [3] [25 6] 4"
189      ]
190     }
191    ],
192    "source": [
193     "z-right"
194    ]
195   },
196   {
197    "cell_type": "code",
198    "execution_count": 9,
199    "metadata": {},
200    "outputs": [
201     {
202      "name": "stdout",
203      "output_type": "stream",
204      "text": [
205       "[1] [8] [2] [7] [4 3] [6] 25"
206      ]
207     }
208    ],
209    "source": [
210     "z-right"
211    ]
212   },
213   {
214    "cell_type": "code",
215    "execution_count": 10,
216    "metadata": {},
217    "outputs": [
218     {
219      "name": "stdout",
220      "output_type": "stream",
221      "text": [
222       "[1] [8] [2] [7] [4 3] [6] 625"
223      ]
224     }
225    ],
226    "source": [
227     "sqr"
228    ]
229   },
230   {
231    "cell_type": "code",
232    "execution_count": 11,
233    "metadata": {},
234    "outputs": [
235     {
236      "name": "stdout",
237      "output_type": "stream",
238      "text": [
239       "[1] [8] [2] [7] [4 3] [6] 625 • z-up\n",
240       "[1] [8] [2] [7] [4 3] [6] 625 • swons swap shunt\n",
241       "[1] [8] [2] [7] [4 3] [625 6] • swap shunt\n",
242       "[1] [8] [2] [7] [625 6] [4 3] • shunt\n",
243       "  [1] [8] [2] [7] [3 4 625 6] • \n",
244       "\n",
245       "[1] [8] [2] [7] [3 4 625 6]"
246      ]
247     }
248    ],
249    "source": [
250     "[z-up] trace"
251    ]
252   },
253   {
254    "cell_type": "code",
255    "execution_count": 12,
256    "metadata": {},
257    "outputs": [
258     {
259      "name": "stdout",
260      "output_type": "stream",
261      "text": [
262       "[1] [8] [2 [3 4 625 6] 7]"
263      ]
264     }
265    ],
266    "source": [
267     "z-up"
268    ]
269   },
270   {
271    "cell_type": "code",
272    "execution_count": 13,
273    "metadata": {},
274    "outputs": [
275     {
276      "name": "stdout",
277      "output_type": "stream",
278      "text": [
279       "[1 [2 [3 4 625 6] 7] 8]"
280      ]
281     }
282    ],
283    "source": [
284     "z-up"
285    ]
286   },
287   {
288    "cell_type": "markdown",
289    "metadata": {},
290    "source": [
291     "## `dip` and `infra`\n",
292     "In Joy we have the `dip` and `infra` combinators which can \"target\" or \"address\" any particular item in a Joy tree structure."
293    ]
294   },
295   {
296    "cell_type": "code",
297    "execution_count": 14,
298    "metadata": {},
299    "outputs": [
300     {
301      "name": "stdout",
302      "output_type": "stream",
303      "text": [
304       "[1 [2 [3 4 625 6] 7] 8] [[[[[[sqr] dipd] infra] dip] infra] dip] • infra\n",
305       "                                           8 [2 [3 4 625 6] 7] 1 • [[[[[sqr] dipd] infra] dip] infra] dip [] swaack\n",
306       "        8 [2 [3 4 625 6] 7] 1 [[[[[sqr] dipd] infra] dip] infra] • dip [] swaack\n",
307       "                                             8 [2 [3 4 625 6] 7] • [[[[sqr] dipd] infra] dip] infra 1 [] swaack\n",
308       "                  8 [2 [3 4 625 6] 7] [[[[sqr] dipd] infra] dip] • infra 1 [] swaack\n",
309       "                                                 7 [3 4 625 6] 2 • [[[sqr] dipd] infra] dip [8] swaack 1 [] swaack\n",
310       "                            7 [3 4 625 6] 2 [[[sqr] dipd] infra] • dip [8] swaack 1 [] swaack\n",
311       "                                                   7 [3 4 625 6] • [[sqr] dipd] infra 2 [8] swaack 1 [] swaack\n",
312       "                                      7 [3 4 625 6] [[sqr] dipd] • infra 2 [8] swaack 1 [] swaack\n",
313       "                                                       6 625 4 3 • [sqr] dipd [7] swaack 2 [8] swaack 1 [] swaack\n",
314       "                                                 6 625 4 3 [sqr] • dipd [7] swaack 2 [8] swaack 1 [] swaack\n",
315       "                                                           6 625 • sqr 4 3 [7] swaack 2 [8] swaack 1 [] swaack\n",
316       "                                                           6 625 • dup * 4 3 [7] swaack 2 [8] swaack 1 [] swaack\n",
317       "                                                       6 625 625 • * 4 3 [7] swaack 2 [8] swaack 1 [] swaack\n",
318       "                                                        6 390625 • 4 3 [7] swaack 2 [8] swaack 1 [] swaack\n",
319       "                                                      6 390625 4 • 3 [7] swaack 2 [8] swaack 1 [] swaack\n",
320       "                                                    6 390625 4 3 • [7] swaack 2 [8] swaack 1 [] swaack\n",
321       "                                                6 390625 4 3 [7] • swaack 2 [8] swaack 1 [] swaack\n",
322       "                                                7 [3 4 390625 6] • 2 [8] swaack 1 [] swaack\n",
323       "                                              7 [3 4 390625 6] 2 • [8] swaack 1 [] swaack\n",
324       "                                          7 [3 4 390625 6] 2 [8] • swaack 1 [] swaack\n",
325       "                                          8 [2 [3 4 390625 6] 7] • 1 [] swaack\n",
326       "                                        8 [2 [3 4 390625 6] 7] 1 • [] swaack\n",
327       "                                     8 [2 [3 4 390625 6] 7] 1 [] • swaack\n",
328       "                                      [1 [2 [3 4 390625 6] 7] 8] • \n",
329       "\n",
330       "[1 [2 [3 4 390625 6] 7] 8]"
331      ]
332     }
333    ],
334    "source": [
335     "[[[[[[sqr] dipd] infra] dip] infra] dip] [infra] trace"
336    ]
337   },
338   {
339    "cell_type": "markdown",
340    "metadata": {},
341    "source": [
342     "If you read the trace carefully you'll see that about half of it is the `dip` and `infra` combinators de-quoting programs and \"digging\" into the subject datastructure.  Instead of maintaining temporary results on the stack they are pushed into the pending expression (continuation).  When `sqr` has run the rest of the pending expression  rebuilds the datastructure.\n",
343     "\n",
344     "## `Z`\n",
345     "Imagine a function `Z` that accepts a sequence of `dip` and `infra` combinators, a quoted program `[Q]`, and a datastructure to work on.  It would effectively execute the quoted program as if it had been embedded in a nested series of quoted programs, e.g.:\n",
346     "\n",
347     "       [...] [Q] [dip dip infra dip infra dip infra] Z\n",
348     "    -------------------------------------------------------------\n",
349     "       [...] [[[[[[[Q] dip] dip] infra] dip] infra] dip] infra\n",
350     "       \n",
351     "The `Z` function isn't hard to make."
352    ]
353   },
354   {
355    "cell_type": "code",
356    "execution_count": 4,
357    "metadata": {},
358    "outputs": [
359     {
360      "name": "stdout",
361      "output_type": "stream",
362      "text": []
363     }
364    ],
365    "source": [
366     "clear"
367    ]
368   },
369   {
370    "cell_type": "code",
371    "execution_count": 2,
372    "metadata": {},
373    "outputs": [
374     {
375      "name": "stdout",
376      "output_type": "stream",
377      "text": [
378       "[Q] [dip dip infra dip infra dip infra]"
379      ]
380     }
381    ],
382    "source": [
383     "[Q] [dip dip infra dip infra dip infra]"
384    ]
385   },
386   {
387    "cell_type": "code",
388    "execution_count": null,
389    "metadata": {},
390    "outputs": [],
391    "source": [
392     "[unit cons] step"
393    ]
394   },
395   {
396    "cell_type": "markdown",
397    "metadata": {},
398    "source": [
399     "So that's broken with the current definition of `step` but this works:"
400    ]
401   },
402   {
403    "cell_type": "code",
404    "execution_count": 6,
405    "metadata": {},
406    "outputs": [
407     {
408      "name": "stdout",
409      "output_type": "stream",
410      "text": []
411     }
412    ],
413    "source": [
414     "clear"
415    ]
416   },
417   {
418    "cell_type": "code",
419    "execution_count": 7,
420    "metadata": {},
421    "outputs": [
422     {
423      "name": "stdout",
424      "output_type": "stream",
425      "text": [
426       "[Q] [[dip] [dip] [infra] [dip] [infra] [dip] [infra]]"
427      ]
428     }
429    ],
430    "source": [
431     "[Q] [[dip] [dip] [infra] [dip] [infra] [dip] [infra]]"
432    ]
433   },
434   {
435    "cell_type": "code",
436    "execution_count": 8,
437    "metadata": {},
438    "outputs": [
439     {
440      "name": "stdout",
441      "output_type": "stream",
442      "text": [
443       "[[[[[[[[Q] dip] dip] infra] dip] infra] dip] infra]"
444      ]
445     }
446    ],
447    "source": [
448     "[cons] step"
449    ]
450   },
451   {
452    "cell_type": "markdown",
453    "metadata": {},
454    "source": [
455     "Do I want to revisit `step` def?  Insist that `Z` use `[[A][B][C]...]` rather than `[A B C ...]`?  Seems clunky, special-cased, and not in the spirit of the thing, eh?\n",
456     "\n",
457     "Arguably,\n",
458     "\n",
459     "    [dip dip infra dip infra dip infra] [unit cons] step\n",
460     "\n",
461     "*should* work, yes?\n",
462     "\n",
463     "\n",
464     "           ... [] [Q] . step\n",
465     "        -----------------------\n",
466     "              ... .\n",
467     "\n",
468     "\n",
469     "           ... [a] [Q] . step\n",
470     "        ------------------------\n",
471     "             ... a . Q\n",
472     "\n",
473     "\n",
474     "           ... [a b c] [Q] . step\n",
475     "        ----------------------------------------\n",
476     "                 ... a . Q [b c] [Q] step\n",
477     "\n"
478    ]
479   },
480   {
481    "cell_type": "code",
482    "execution_count": 9,
483    "metadata": {},
484    "outputs": [
485     {
486      "name": "stdout",
487      "output_type": "stream",
488      "text": []
489     }
490    ],
491    "source": [
492     "clear"
493    ]
494   },
495   {
496    "cell_type": "code",
497    "execution_count": 10,
498    "metadata": {},
499    "outputs": [
500     {
501      "name": "stdout",
502      "output_type": "stream",
503      "text": [
504       "[dip dip infra dip infra dip infra]"
505      ]
506     }
507    ],
508    "source": [
509     "[dip dip infra dip infra dip infra]"
510    ]
511   },
512   {
513    "cell_type": "code",
514    "execution_count": 11,
515    "metadata": {},
516    "outputs": [
517     {
518      "name": "stdout",
519      "output_type": "stream",
520      "text": [
521       "[[dip] dip infra dip infra dip infra]"
522      ]
523     }
524    ],
525    "source": [
526     "[unit] infra"
527    ]
528   },
529   {
530    "cell_type": "code",
531    "execution_count": null,
532    "metadata": {},
533    "outputs": [],
534    "source": []
535   },
536   {
537    "cell_type": "code",
538    "execution_count": null,
539    "metadata": {},
540    "outputs": [],
541    "source": []
542   },
543   {
544    "cell_type": "markdown",
545    "metadata": {},
546    "source": [
547     "Argh!  It is inside `uncons` itself, isn't it!?"
548    ]
549   },
550   {
551    "cell_type": "code",
552    "execution_count": 1,
553    "metadata": {},
554    "outputs": [
555     {
556      "name": "stdout",
557      "output_type": "stream",
558      "text": []
559     }
560    ],
561    "source": [
562     "clear"
563    ]
564   },
565   {
566    "cell_type": "code",
567    "execution_count": 2,
568    "metadata": {},
569    "outputs": [
570     {
571      "name": "stdout",
572      "output_type": "stream",
573      "text": [
574       "[Q] [dip dip infra dip infra dip infra]"
575      ]
576     }
577    ],
578    "source": [
579     "[Q] [dip dip infra dip infra dip infra]"
580    ]
581   },
582   {
583    "cell_type": "code",
584    "execution_count": null,
585    "metadata": {},
586    "outputs": [],
587    "source": [
588     "uncons"
589    ]
590   },
591   {
592    "cell_type": "code",
593    "execution_count": null,
594    "metadata": {},
595    "outputs": [],
596    "source": []
597   },
598   {
599    "cell_type": "code",
600    "execution_count": 4,
601    "metadata": {},
602    "outputs": [
603     {
604      "name": "stdout",
605      "output_type": "stream",
606      "text": [
607       "[Q] [dip dip infra dip infra dip infra]"
608      ]
609     }
610    ],
611    "source": [
612     "[popdd roll< pop] inscribe"
613    ]
614   },
615   {
616    "cell_type": "code",
617    "execution_count": 5,
618    "metadata": {},
619    "outputs": [
620     {
621      "name": "stdout",
622      "output_type": "stream",
623      "text": []
624     }
625    ],
626    "source": [
627     "clear"
628    ]
629   },
630   {
631    "cell_type": "code",
632    "execution_count": 6,
633    "metadata": {},
634    "outputs": [
635     {
636      "name": "stdout",
637      "output_type": "stream",
638      "text": [
639       "[Q] [dip dip infra dip infra dip infra]"
640      ]
641     }
642    ],
643    "source": [
644     "[Q] [dip dip infra dip infra dip infra]"
645    ]
646   },
647   {
648    "cell_type": "code",
649    "execution_count": 7,
650    "metadata": {},
651    "outputs": [
652     {
653      "name": "stdout",
654      "output_type": "stream",
655      "text": [
656       "[Q] dip [dip infra dip infra dip infra]"
657      ]
658     }
659    ],
660    "source": [
661     "uncons"
662    ]
663   },
664   {
665    "cell_type": "code",
666    "execution_count": null,
667    "metadata": {},
668    "outputs": [],
669    "source": []
670   },
671   {
672    "cell_type": "code",
673    "execution_count": null,
674    "metadata": {},
675    "outputs": [],
676    "source": []
677   },
678   {
679    "cell_type": "code",
680    "execution_count": null,
681    "metadata": {},
682    "outputs": [],
683    "source": []
684   },
685   {
686    "cell_type": "code",
687    "execution_count": null,
688    "metadata": {},
689    "outputs": [],
690    "source": []
691   },
692   {
693    "cell_type": "code",
694    "execution_count": 6,
695    "metadata": {},
696    "outputs": [
697     {
698      "name": "stdout",
699      "output_type": "stream",
700      "text": []
701     }
702    ],
703    "source": [
704     "[Z [[] ccons] step i] inscribe"
705    ]
706   },
707   {
708    "cell_type": "markdown",
709    "metadata": {},
710    "source": [
711     "Here it is in action in a simplified scenario."
712    ]
713   },
714   {
715    "cell_type": "code",
716    "execution_count": 7,
717    "metadata": {},
718    "outputs": [
719     {
720      "name": "stdout",
721      "output_type": "stream",
722      "text": [
723       "                                                                                   1 [2 3 4] • Z\n",
724       "                                                                                   1 [2 3 4] • [[] ccons] step i\n",
725       "                                                                        1 [2 3 4] [[] ccons] • step i\n",
726       "                                                                        1 [2 3 4] [[] ccons] • [_step0] x i\n",
727       "                                                               1 [2 3 4] [[] ccons] [_step0] • x i\n",
728       "                                                               1 [2 3 4] [[] ccons] [_step0] • dup i i\n",
729       "                                                      1 [2 3 4] [[] ccons] [_step0] [_step0] • i i\n",
730       "                                                               1 [2 3 4] [[] ccons] [_step0] • _step0 i\n",
731       "                                                               1 [2 3 4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
732       "                                                               1 [2 3 4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
733       "                                                           1 [2 3 4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
734       "                                                           1 [2 3 4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
735       "                                                     1 [2 3 4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
736       "                                                     1 [2 3 4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
737       "                                                     1 [2 3 4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
738       "                                                                        1 [2 3 4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
739       "                                                                    1 [2 3 4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
740       "                                                                                   1 [2 3 4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
741       "                                                                                   1 [2 3 4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
742       "                                                                           1 [2 3 4] [2 3 4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
743       "                                                                              1 [2 3 4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
744       "                                                                   1 [2 3 4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
745       "                                                          1 [2 3 4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
746       "                                                          1 [2 3 4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
747       "                                                          1 [2 3 4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
748       "                                                   1 [2 3 4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
749       "                                                                   1 [2 3 4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
750       "                                                                   1 [2 3 4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
751       "                                                          1 [2 3 4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
752       "                                                          1 [2 3 4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
753       "                                                1 [2 3 4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
754       "                                       1 [2 3 4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
755       "                                                               1 [2 3 4] [[] ccons] [_step0] • _stept i\n",
756       "                                                               1 [2 3 4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
757       "                                                      1 [2 3 4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
758       "                                                      1 [2 3 4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
759       "                                                1 [2 3 4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
760       "                                                1 [2 3 4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
761       "                                                1 [2 3 4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
762       "                                                                        1 [2 3 4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
763       "                                                               1 [2 3 4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
764       "                                                                                   1 [2 3 4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
765       "                                                                                   1 [2 3 4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
766       "                                                                           1 [2 3 4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
767       "                                                                    1 [2 3 4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
768       "                                                                    1 [2 3 4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
769       "                                                                    1 [2 3 4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
770       "                                                                1 [2 3 4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
771       "                                                                1 [2 3 4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
772       "                                          1 [2 3 4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
773       "                                                                    1 [2 3 4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
774       "                                                                    1 [2 3 4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
775       "                                                       1 [2 3 4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
776       "                                                                           1 [2 3 4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
777       "                                                       1 [2 3 4] [first] [[first] [2 3 4] 1] • popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
778       "                                                       1 [2 3 4] [first] [[first] [2 3 4] 1] • [pop] dip [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
779       "                                                 1 [2 3 4] [first] [[first] [2 3 4] 1] [pop] • dip [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
780       "                                                                           1 [2 3 4] [first] • pop [[first] [2 3 4] 1] [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
781       "                                                                                   1 [2 3 4] • [[first] [2 3 4] 1] [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
782       "                                                               1 [2 3 4] [[first] [2 3 4] 1] • [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
783       "                                                        1 [2 3 4] [[first] [2 3 4] 1] [rest] • swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
784       "                                                        1 [2 3 4] [rest] [[first] [2 3 4] 1] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
785       "                                                        1 [2 3 4] [rest] [[first] [2 3 4] 1] • [stack popd] dip swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
786       "                                           1 [2 3 4] [rest] [[first] [2 3 4] 1] [stack popd] • dip swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
787       "                                                                            1 [2 3 4] [rest] • stack popd [[first] [2 3 4] 1] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
788       "                                                         1 [2 3 4] [rest] [[rest] [2 3 4] 1] • popd [[first] [2 3 4] 1] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
789       "                                                         1 [2 3 4] [rest] [[rest] [2 3 4] 1] • [pop] dip [[first] [2 3 4] 1] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
790       "                                                   1 [2 3 4] [rest] [[rest] [2 3 4] 1] [pop] • dip [[first] [2 3 4] 1] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
791       "                                                                            1 [2 3 4] [rest] • pop [[rest] [2 3 4] 1] [[first] [2 3 4] 1] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
792       "                                                                                   1 [2 3 4] • [[rest] [2 3 4] 1] [[first] [2 3 4] 1] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
793       "                                                                1 [2 3 4] [[rest] [2 3 4] 1] • [[first] [2 3 4] 1] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
794       "                                            1 [2 3 4] [[rest] [2 3 4] 1] [[first] [2 3 4] 1] • swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
795       "                                            1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] • [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
796       "                                        1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [i] • [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
797       "                               1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [i] [infrst] • cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
798       "                               1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] • ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
799       "                               1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] • [dip] dupdip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
800       "                         1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] [dip] • dupdip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
801       "                         1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] [dip] • dupd dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
802       "                         1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] [dip] • [dup] dip dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
803       "                   1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] [dip] [dup] • dip dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
804       "                               1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] • dup [dip] dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
805       "                  1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] [[i] infrst] • [dip] dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
806       "            1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] [[i] infrst] [dip] • dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
807       "                               1 [2 3 4] [[first] [2 3 4] 1] [[rest] [2 3 4] 1] [[i] infrst] • dip [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
808       "                                                               1 [2 3 4] [[first] [2 3 4] 1] • [i] infrst [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
809       "                                                           1 [2 3 4] [[first] [2 3 4] 1] [i] • infrst [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
810       "                                                           1 [2 3 4] [[first] [2 3 4] 1] [i] • infra first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
811       "                                                           1 [2 3 4] [[first] [2 3 4] 1] [i] • swons swaack [i] dip swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
812       "                                                           1 [2 3 4] [[first] [2 3 4] 1] [i] • swap cons swaack [i] dip swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
813       "                                                           1 [2 3 4] [i] [[first] [2 3 4] 1] • cons swaack [i] dip swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
814       "                                                           1 [2 3 4] [[i] [first] [2 3 4] 1] • swaack [i] dip swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
815       "                                                           1 [2 3 4] [first] [i] [[2 3 4] 1] • [i] dip swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
816       "                                                       1 [2 3 4] [first] [i] [[2 3 4] 1] [i] • dip swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
817       "                                                                       1 [2 3 4] [first] [i] • i [[2 3 4] 1] swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
818       "                                                                           1 [2 3 4] [first] • i [[2 3 4] 1] swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
819       "                                                                                   1 [2 3 4] • first [[2 3 4] 1] swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
820       "                                                                                         1 2 • [[2 3 4] 1] swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
821       "                                                                             1 2 [[2 3 4] 1] • swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
822       "                                                                             1 [2 3 4] [2 1] • first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
823       "                                                                                 1 [2 3 4] 2 • [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
824       "                                                              1 [2 3 4] 2 [[rest] [2 3 4] 1] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
825       "                                                 1 [2 3 4] 2 [[rest] [2 3 4] 1] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
826       "                                                              1 [2 3 4] 2 [[rest] [2 3 4] 1] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
827       "                                                          1 [2 3 4] 2 [[rest] [2 3 4] 1] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
828       "                                                          1 [2 3 4] 2 [[rest] [2 3 4] 1] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
829       "                                                          1 [2 3 4] 2 [[rest] [2 3 4] 1] [i] • swons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
830       "                                                          1 [2 3 4] 2 [[rest] [2 3 4] 1] [i] • swap cons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
831       "                                                          1 [2 3 4] 2 [i] [[rest] [2 3 4] 1] • cons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
832       "                                                          1 [2 3 4] 2 [[i] [rest] [2 3 4] 1] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
833       "                                                          1 [2 3 4] [rest] [i] [2 [2 3 4] 1] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
834       "                                                      1 [2 3 4] [rest] [i] [2 [2 3 4] 1] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
835       "                                                                        1 [2 3 4] [rest] [i] • i [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
836       "                                                                            1 [2 3 4] [rest] • i [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
837       "                                                                                   1 [2 3 4] • rest [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
838       "                                                                                   1 [2 3 4] • [pop] infra [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
839       "                                                                             1 [2 3 4] [pop] • infra [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
840       "                                                                             1 [2 3 4] [pop] • swons swaack [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
841       "                                                                             1 [2 3 4] [pop] • swap cons swaack [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
842       "                                                                             1 [pop] [2 3 4] • cons swaack [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
843       "                                                                             1 [[pop] 2 3 4] • swaack [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
844       "                                                                             4 3 2 [pop] [1] • [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
845       "                                                                         4 3 2 [pop] [1] [i] • dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
846       "                                                                                 4 3 2 [pop] • i [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
847       "                                                                                       4 3 2 • pop [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
848       "                                                                                         4 3 • [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
849       "                                                                                     4 3 [1] • swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
850       "                                                                                     1 [3 4] • [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
851       "                                                                       1 [3 4] [2 [2 3 4] 1] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
852       "                                                                       1 [2 3 4] 2 [[3 4] 1] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
853       "                                                                           1 [2 3 4] 2 [3 4] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
854       "                                                                           1 [2 3 4] 2 [3 4] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
855       "                                                                     1 [2 3 4] 2 [3 4] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
856       "                                                                     1 [2 3 4] 2 [3 4] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
857       "                                                               1 [2 3 4] 2 [3 4] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
858       "                                                               1 [2 3 4] 2 [3 4] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
859       "                                                               1 [2 3 4] 2 [3 4] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
860       "                                                                                 1 [2 3 4] 2 • [pop] dip [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
861       "                                                                           1 [2 3 4] 2 [pop] • dip [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
862       "                                                                                   1 [2 3 4] • pop 2 [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
863       "                                                                                           1 • 2 [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
864       "                                                                                         1 2 • [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
865       "                                                                                   1 2 [3 4] • [[] ccons] [_step0] [dupdipd] dip x i\n",
866       "                                                                        1 2 [3 4] [[] ccons] • [_step0] [dupdipd] dip x i\n",
867       "                                                               1 2 [3 4] [[] ccons] [_step0] • [dupdipd] dip x i\n",
868       "                                                     1 2 [3 4] [[] ccons] [_step0] [dupdipd] • dip x i\n",
869       "                                                                        1 2 [3 4] [[] ccons] • dupdipd [_step0] x i\n",
870       "                                                                        1 2 [3 4] [[] ccons] • dup dipd [_step0] x i\n",
871       "                                                             1 2 [3 4] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
872       "                                                             1 2 [3 4] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
873       "                                                       1 2 [3 4] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
874       "                                                       1 2 [3 4] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
875       "                                                       1 2 [3 4] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
876       "                                                                                   1 2 [3 4] • [[] ccons] dip [[] ccons] [_step0] x i\n",
877       "                                                                        1 2 [3 4] [[] ccons] • dip [[] ccons] [_step0] x i\n",
878       "                                                                                         1 2 • [] ccons [3 4] [[] ccons] [_step0] x i\n",
879       "                                                                                      1 2 [] • ccons [3 4] [[] ccons] [_step0] x i\n",
880       "                                                                                      1 2 [] • cons cons [3 4] [[] ccons] [_step0] x i\n",
881       "                                                                                       1 [2] • cons [3 4] [[] ccons] [_step0] x i\n",
882       "                                                                                       [1 2] • [3 4] [[] ccons] [_step0] x i\n",
883       "                                                                                 [1 2] [3 4] • [[] ccons] [_step0] x i\n",
884       "                                                                      [1 2] [3 4] [[] ccons] • [_step0] x i\n",
885       "                                                             [1 2] [3 4] [[] ccons] [_step0] • x i\n",
886       "                                                             [1 2] [3 4] [[] ccons] [_step0] • dup i i\n",
887       "                                                    [1 2] [3 4] [[] ccons] [_step0] [_step0] • i i\n",
888       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _step0 i\n",
889       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
890       "                                                             [1 2] [3 4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
891       "                                                         [1 2] [3 4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
892       "                                                         [1 2] [3 4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
893       "                                                   [1 2] [3 4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
894       "                                                   [1 2] [3 4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
895       "                                                   [1 2] [3 4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
896       "                                                                      [1 2] [3 4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
897       "                                                                  [1 2] [3 4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
898       "                                                                                 [1 2] [3 4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
899       "                                                                                 [1 2] [3 4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
900       "                                                                           [1 2] [3 4] [3 4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
901       "                                                                            [1 2] [3 4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
902       "                                                                 [1 2] [3 4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
903       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
904       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
905       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
906       "                                                 [1 2] [3 4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
907       "                                                                 [1 2] [3 4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
908       "                                                                 [1 2] [3 4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
909       "                                                        [1 2] [3 4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
910       "                                                        [1 2] [3 4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
911       "                                              [1 2] [3 4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
912       "                                     [1 2] [3 4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
913       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _stept i\n",
914       "                                                             [1 2] [3 4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
915       "                                                    [1 2] [3 4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
916       "                                                    [1 2] [3 4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
917       "                                              [1 2] [3 4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
918       "                                              [1 2] [3 4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
919       "                                              [1 2] [3 4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
920       "                                                                      [1 2] [3 4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
921       "                                                             [1 2] [3 4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
922       "                                                                                 [1 2] [3 4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
923       "                                                                                 [1 2] [3 4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
924       "                                                                         [1 2] [3 4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
925       "                                                                  [1 2] [3 4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
926       "                                                                  [1 2] [3 4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
927       "                                                                  [1 2] [3 4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
928       "                                                              [1 2] [3 4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
929       "                                                              [1 2] [3 4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
930       "                                        [1 2] [3 4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
931       "                                                                  [1 2] [3 4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
932       "                                                                  [1 2] [3 4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
933       "                                                     [1 2] [3 4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
934       "                                                                         [1 2] [3 4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
935       "                                                   [1 2] [3 4] [first] [[first] [3 4] [1 2]] • popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
936       "                                                   [1 2] [3 4] [first] [[first] [3 4] [1 2]] • [pop] dip [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
937       "                                             [1 2] [3 4] [first] [[first] [3 4] [1 2]] [pop] • dip [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
938       "                                                                         [1 2] [3 4] [first] • pop [[first] [3 4] [1 2]] [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
939       "                                                                                 [1 2] [3 4] • [[first] [3 4] [1 2]] [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
940       "                                                           [1 2] [3 4] [[first] [3 4] [1 2]] • [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
941       "                                                    [1 2] [3 4] [[first] [3 4] [1 2]] [rest] • swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
942       "                                                    [1 2] [3 4] [rest] [[first] [3 4] [1 2]] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
943       "                                                    [1 2] [3 4] [rest] [[first] [3 4] [1 2]] • [stack popd] dip swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
944       "                                       [1 2] [3 4] [rest] [[first] [3 4] [1 2]] [stack popd] • dip swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
945       "                                                                          [1 2] [3 4] [rest] • stack popd [[first] [3 4] [1 2]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
946       "                                                     [1 2] [3 4] [rest] [[rest] [3 4] [1 2]] • popd [[first] [3 4] [1 2]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
947       "                                                     [1 2] [3 4] [rest] [[rest] [3 4] [1 2]] • [pop] dip [[first] [3 4] [1 2]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
948       "                                               [1 2] [3 4] [rest] [[rest] [3 4] [1 2]] [pop] • dip [[first] [3 4] [1 2]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
949       "                                                                          [1 2] [3 4] [rest] • pop [[rest] [3 4] [1 2]] [[first] [3 4] [1 2]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
950       "                                                                                 [1 2] [3 4] • [[rest] [3 4] [1 2]] [[first] [3 4] [1 2]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
951       "                                                            [1 2] [3 4] [[rest] [3 4] [1 2]] • [[first] [3 4] [1 2]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
952       "                                      [1 2] [3 4] [[rest] [3 4] [1 2]] [[first] [3 4] [1 2]] • swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
953       "                                      [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] • [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
954       "                                  [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [i] • [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
955       "                         [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [i] [infrst] • cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
956       "                         [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] • ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
957       "                         [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] • [dip] dupdip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
958       "                   [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] [dip] • dupdip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
959       "                   [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] [dip] • dupd dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
960       "                   [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] [dip] • [dup] dip dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
961       "             [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] [dip] [dup] • dip dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
962       "                         [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] • dup [dip] dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
963       "            [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] [[i] infrst] • [dip] dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
964       "      [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] [[i] infrst] [dip] • dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
965       "                         [1 2] [3 4] [[first] [3 4] [1 2]] [[rest] [3 4] [1 2]] [[i] infrst] • dip [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
966       "                                                           [1 2] [3 4] [[first] [3 4] [1 2]] • [i] infrst [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
967       "                                                       [1 2] [3 4] [[first] [3 4] [1 2]] [i] • infrst [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
968       "                                                       [1 2] [3 4] [[first] [3 4] [1 2]] [i] • infra first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
969       "                                                       [1 2] [3 4] [[first] [3 4] [1 2]] [i] • swons swaack [i] dip swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
970       "                                                       [1 2] [3 4] [[first] [3 4] [1 2]] [i] • swap cons swaack [i] dip swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
971       "                                                       [1 2] [3 4] [i] [[first] [3 4] [1 2]] • cons swaack [i] dip swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
972       "                                                       [1 2] [3 4] [[i] [first] [3 4] [1 2]] • swaack [i] dip swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
973       "                                                       [1 2] [3 4] [first] [i] [[3 4] [1 2]] • [i] dip swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
974       "                                                   [1 2] [3 4] [first] [i] [[3 4] [1 2]] [i] • dip swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
975       "                                                                     [1 2] [3 4] [first] [i] • i [[3 4] [1 2]] swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
976       "                                                                         [1 2] [3 4] [first] • i [[3 4] [1 2]] swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
977       "                                                                                 [1 2] [3 4] • first [[3 4] [1 2]] swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
978       "                                                                                     [1 2] 3 • [[3 4] [1 2]] swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
979       "                                                                       [1 2] 3 [[3 4] [1 2]] • swaack first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
980       "                                                                       [1 2] [3 4] [3 [1 2]] • first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
981       "                                                                               [1 2] [3 4] 3 • [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
982       "                                                          [1 2] [3 4] 3 [[rest] [3 4] [1 2]] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
983       "                                             [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
984       "                                                          [1 2] [3 4] 3 [[rest] [3 4] [1 2]] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
985       "                                                      [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
986       "                                                      [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
987       "                                                      [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [i] • swons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
988       "                                                      [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [i] • swap cons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
989       "                                                      [1 2] [3 4] 3 [i] [[rest] [3 4] [1 2]] • cons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
990       "                                                      [1 2] [3 4] 3 [[i] [rest] [3 4] [1 2]] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
991       "                                                      [1 2] [3 4] [rest] [i] [3 [3 4] [1 2]] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
992       "                                                  [1 2] [3 4] [rest] [i] [3 [3 4] [1 2]] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
993       "                                                                      [1 2] [3 4] [rest] [i] • i [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
994       "                                                                          [1 2] [3 4] [rest] • i [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
995       "                                                                                 [1 2] [3 4] • rest [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
996       "                                                                                 [1 2] [3 4] • [pop] infra [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
997       "                                                                           [1 2] [3 4] [pop] • infra [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
998       "                                                                           [1 2] [3 4] [pop] • swons swaack [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
999       "                                                                           [1 2] [3 4] [pop] • swap cons swaack [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1000       "                                                                           [1 2] [pop] [3 4] • cons swaack [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1001       "                                                                           [1 2] [[pop] 3 4] • swaack [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1002       "                                                                           4 3 [pop] [[1 2]] • [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1003       "                                                                       4 3 [pop] [[1 2]] [i] • dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1004       "                                                                                   4 3 [pop] • i [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1005       "                                                                                         4 3 • pop [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1006       "                                                                                           4 • [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1007       "                                                                                   4 [[1 2]] • swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1008       "                                                                                   [1 2] [4] • [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1009       "                                                                   [1 2] [4] [3 [3 4] [1 2]] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1010       "                                                                   [1 2] [3 4] 3 [[4] [1 2]] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1011       "                                                                           [1 2] [3 4] 3 [4] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1012       "                                                                           [1 2] [3 4] 3 [4] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
1013       "                                                                     [1 2] [3 4] 3 [4] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
1014       "                                                                     [1 2] [3 4] 3 [4] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
1015       "                                                               [1 2] [3 4] 3 [4] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
1016       "                                                               [1 2] [3 4] 3 [4] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
1017       "                                                               [1 2] [3 4] 3 [4] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
1018       "                                                                               [1 2] [3 4] 3 • [pop] dip [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
1019       "                                                                         [1 2] [3 4] 3 [pop] • dip [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
1020       "                                                                                 [1 2] [3 4] • pop 3 [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
1021       "                                                                                       [1 2] • 3 [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
1022       "                                                                                     [1 2] 3 • [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
1023       "                                                                                 [1 2] 3 [4] • [[] ccons] [_step0] [dupdipd] dip x i\n",
1024       "                                                                      [1 2] 3 [4] [[] ccons] • [_step0] [dupdipd] dip x i\n",
1025       "                                                             [1 2] 3 [4] [[] ccons] [_step0] • [dupdipd] dip x i\n",
1026       "                                                   [1 2] 3 [4] [[] ccons] [_step0] [dupdipd] • dip x i\n",
1027       "                                                                      [1 2] 3 [4] [[] ccons] • dupdipd [_step0] x i\n",
1028       "                                                                      [1 2] 3 [4] [[] ccons] • dup dipd [_step0] x i\n",
1029       "                                                           [1 2] 3 [4] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
1030       "                                                           [1 2] 3 [4] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
1031       "                                                     [1 2] 3 [4] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
1032       "                                                     [1 2] 3 [4] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
1033       "                                                     [1 2] 3 [4] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
1034       "                                                                                 [1 2] 3 [4] • [[] ccons] dip [[] ccons] [_step0] x i\n",
1035       "                                                                      [1 2] 3 [4] [[] ccons] • dip [[] ccons] [_step0] x i\n",
1036       "                                                                                     [1 2] 3 • [] ccons [4] [[] ccons] [_step0] x i\n",
1037       "                                                                                  [1 2] 3 [] • ccons [4] [[] ccons] [_step0] x i\n",
1038       "                                                                                  [1 2] 3 [] • cons cons [4] [[] ccons] [_step0] x i\n",
1039       "                                                                                   [1 2] [3] • cons [4] [[] ccons] [_step0] x i\n",
1040       "                                                                                   [[1 2] 3] • [4] [[] ccons] [_step0] x i\n",
1041       "                                                                               [[1 2] 3] [4] • [[] ccons] [_step0] x i\n",
1042       "                                                                    [[1 2] 3] [4] [[] ccons] • [_step0] x i\n",
1043       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • x i\n",
1044       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • dup i i\n",
1045       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [_step0] • i i\n",
1046       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _step0 i\n",
1047       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
1048       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
1049       "                                                       [[1 2] 3] [4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
1050       "                                                       [[1 2] 3] [4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
1051       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
1052       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
1053       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
1054       "                                                                    [[1 2] 3] [4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
1055       "                                                                [[1 2] 3] [4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
1056       "                                                                               [[1 2] 3] [4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1057       "                                                                               [[1 2] 3] [4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1058       "                                                                           [[1 2] 3] [4] [4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1059       "                                                                          [[1 2] 3] [4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1060       "                                                               [[1 2] 3] [4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
1061       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
1062       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
1063       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
1064       "                                               [[1 2] 3] [4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
1065       "                                                               [[1 2] 3] [4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
1066       "                                                               [[1 2] 3] [4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
1067       "                                                      [[1 2] 3] [4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
1068       "                                                      [[1 2] 3] [4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
1069       "                                            [[1 2] 3] [4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
1070       "                                   [[1 2] 3] [4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
1071       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _stept i\n",
1072       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
1073       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
1074       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
1075       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
1076       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
1077       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
1078       "                                                                    [[1 2] 3] [4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
1079       "                                                           [[1 2] 3] [4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
1080       "                                                                               [[1 2] 3] [4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
1081       "                                                                               [[1 2] 3] [4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
1082       "                                                                       [[1 2] 3] [4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
1083       "                                                                [[1 2] 3] [4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
1084       "                                                                [[1 2] 3] [4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1085       "                                                                [[1 2] 3] [4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1086       "                                                            [[1 2] 3] [4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1087       "                                                            [[1 2] 3] [4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1088       "                                      [[1 2] 3] [4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1089       "                                                                [[1 2] 3] [4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1090       "                                                                [[1 2] 3] [4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1091       "                                                   [[1 2] 3] [4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1092       "                                                                       [[1 2] 3] [4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1093       "                                               [[1 2] 3] [4] [first] [[first] [4] [[1 2] 3]] • popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1094       "                                               [[1 2] 3] [4] [first] [[first] [4] [[1 2] 3]] • [pop] dip [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1095       "                                         [[1 2] 3] [4] [first] [[first] [4] [[1 2] 3]] [pop] • dip [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1096       "                                                                       [[1 2] 3] [4] [first] • pop [[first] [4] [[1 2] 3]] [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1097       "                                                                               [[1 2] 3] [4] • [[first] [4] [[1 2] 3]] [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1098       "                                                       [[1 2] 3] [4] [[first] [4] [[1 2] 3]] • [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1099       "                                                [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [rest] • swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1100       "                                                [[1 2] 3] [4] [rest] [[first] [4] [[1 2] 3]] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1101       "                                                [[1 2] 3] [4] [rest] [[first] [4] [[1 2] 3]] • [stack popd] dip swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1102       "                                   [[1 2] 3] [4] [rest] [[first] [4] [[1 2] 3]] [stack popd] • dip swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1103       "                                                                        [[1 2] 3] [4] [rest] • stack popd [[first] [4] [[1 2] 3]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1104       "                                                 [[1 2] 3] [4] [rest] [[rest] [4] [[1 2] 3]] • popd [[first] [4] [[1 2] 3]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1105       "                                                 [[1 2] 3] [4] [rest] [[rest] [4] [[1 2] 3]] • [pop] dip [[first] [4] [[1 2] 3]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1106       "                                           [[1 2] 3] [4] [rest] [[rest] [4] [[1 2] 3]] [pop] • dip [[first] [4] [[1 2] 3]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1107       "                                                                        [[1 2] 3] [4] [rest] • pop [[rest] [4] [[1 2] 3]] [[first] [4] [[1 2] 3]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1108       "                                                                               [[1 2] 3] [4] • [[rest] [4] [[1 2] 3]] [[first] [4] [[1 2] 3]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1109       "                                                        [[1 2] 3] [4] [[rest] [4] [[1 2] 3]] • [[first] [4] [[1 2] 3]] swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1110       "                                [[1 2] 3] [4] [[rest] [4] [[1 2] 3]] [[first] [4] [[1 2] 3]] • swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1111       "                                [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] • [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1112       "                            [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [i] • [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1113       "                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [i] [infrst] • cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1114       "                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] • ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1115       "                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] • [dip] dupdip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1116       "             [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] [dip] • dupdip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1117       "             [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] [dip] • dupd dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1118       "             [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] [dip] • [dup] dip dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1119       "       [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] [dip] [dup] • dip dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1120       "                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] • dup [dip] dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1121       "      [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] [[i] infrst] • [dip] dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1122       "[[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] [[i] infrst] [dip] • dip i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1123       "                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [[rest] [4] [[1 2] 3]] [[i] infrst] • dip [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1124       "                                                       [[1 2] 3] [4] [[first] [4] [[1 2] 3]] • [i] infrst [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1125       "                                                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [i] • infrst [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1126       "                                                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [i] • infra first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1127       "                                                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [i] • swons swaack [i] dip swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1128       "                                                   [[1 2] 3] [4] [[first] [4] [[1 2] 3]] [i] • swap cons swaack [i] dip swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1129       "                                                   [[1 2] 3] [4] [i] [[first] [4] [[1 2] 3]] • cons swaack [i] dip swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1130       "                                                   [[1 2] 3] [4] [[i] [first] [4] [[1 2] 3]] • swaack [i] dip swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1131       "                                                   [[1 2] 3] [4] [first] [i] [[4] [[1 2] 3]] • [i] dip swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1132       "                                               [[1 2] 3] [4] [first] [i] [[4] [[1 2] 3]] [i] • dip swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1133       "                                                                   [[1 2] 3] [4] [first] [i] • i [[4] [[1 2] 3]] swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1134       "                                                                       [[1 2] 3] [4] [first] • i [[4] [[1 2] 3]] swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1135       "                                                                               [[1 2] 3] [4] • first [[4] [[1 2] 3]] swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1136       "                                                                                 [[1 2] 3] 4 • [[4] [[1 2] 3]] swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1137       "                                                                 [[1 2] 3] 4 [[4] [[1 2] 3]] • swaack first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1138       "                                                                 [[1 2] 3] [4] [4 [[1 2] 3]] • first [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1139       "                                                                             [[1 2] 3] [4] 4 • [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1140       "                                                      [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1141       "                                         [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1142       "                                                      [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1143       "                                                  [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1144       "                                                  [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1145       "                                                  [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [i] • swons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1146       "                                                  [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [i] • swap cons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1147       "                                                  [[1 2] 3] [4] 4 [i] [[rest] [4] [[1 2] 3]] • cons swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1148       "                                                  [[1 2] 3] [4] 4 [[i] [rest] [4] [[1 2] 3]] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1149       "                                                  [[1 2] 3] [4] [rest] [i] [4 [4] [[1 2] 3]] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1150       "                                              [[1 2] 3] [4] [rest] [i] [4 [4] [[1 2] 3]] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1151       "                                                                    [[1 2] 3] [4] [rest] [i] • i [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1152       "                                                                        [[1 2] 3] [4] [rest] • i [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1153       "                                                                               [[1 2] 3] [4] • rest [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1154       "                                                                               [[1 2] 3] [4] • [pop] infra [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1155       "                                                                         [[1 2] 3] [4] [pop] • infra [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1156       "                                                                         [[1 2] 3] [4] [pop] • swons swaack [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1157       "                                                                         [[1 2] 3] [4] [pop] • swap cons swaack [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1158       "                                                                         [[1 2] 3] [pop] [4] • cons swaack [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1159       "                                                                         [[1 2] 3] [[pop] 4] • swaack [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1160       "                                                                         4 [pop] [[[1 2] 3]] • [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1161       "                                                                     4 [pop] [[[1 2] 3]] [i] • dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1162       "                                                                                     4 [pop] • i [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1163       "                                                                                           4 • pop [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1164       "                                                                                             • [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1165       "                                                                                 [[[1 2] 3]] • swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1166       "                                                                                [[1 2] 3] [] • [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1167       "                                                              [[1 2] 3] [] [4 [4] [[1 2] 3]] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1168       "                                                              [[1 2] 3] [4] 4 [[] [[1 2] 3]] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1169       "                                                                          [[1 2] 3] [4] 4 [] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1170       "                                                                          [[1 2] 3] [4] 4 [] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
1171       "                                                                    [[1 2] 3] [4] 4 [] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
1172       "                                                                    [[1 2] 3] [4] 4 [] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
1173       "                                                              [[1 2] 3] [4] 4 [] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
1174       "                                                              [[1 2] 3] [4] 4 [] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
1175       "                                                              [[1 2] 3] [4] 4 [] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
1176       "                                                                             [[1 2] 3] [4] 4 • [pop] dip [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1177       "                                                                       [[1 2] 3] [4] 4 [pop] • dip [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1178       "                                                                               [[1 2] 3] [4] • pop 4 [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1179       "                                                                                   [[1 2] 3] • 4 [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1180       "                                                                                 [[1 2] 3] 4 • [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1181       "                                                                              [[1 2] 3] 4 [] • [[] ccons] [_step0] [dupdipd] dip x i\n",
1182       "                                                                   [[1 2] 3] 4 [] [[] ccons] • [_step0] [dupdipd] dip x i\n",
1183       "                                                          [[1 2] 3] 4 [] [[] ccons] [_step0] • [dupdipd] dip x i\n",
1184       "                                                [[1 2] 3] 4 [] [[] ccons] [_step0] [dupdipd] • dip x i\n",
1185       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dupdipd [_step0] x i\n",
1186       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dup dipd [_step0] x i\n",
1187       "                                                        [[1 2] 3] 4 [] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
1188       "                                                        [[1 2] 3] 4 [] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
1189       "                                                  [[1 2] 3] 4 [] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
1190       "                                                  [[1 2] 3] 4 [] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
1191       "                                                  [[1 2] 3] 4 [] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
1192       "                                                                              [[1 2] 3] 4 [] • [[] ccons] dip [[] ccons] [_step0] x i\n",
1193       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dip [[] ccons] [_step0] x i\n",
1194       "                                                                                 [[1 2] 3] 4 • [] ccons [] [[] ccons] [_step0] x i\n",
1195       "                                                                              [[1 2] 3] 4 [] • ccons [] [[] ccons] [_step0] x i\n",
1196       "                                                                              [[1 2] 3] 4 [] • cons cons [] [[] ccons] [_step0] x i\n",
1197       "                                                                               [[1 2] 3] [4] • cons [] [[] ccons] [_step0] x i\n",
1198       "                                                                               [[[1 2] 3] 4] • [] [[] ccons] [_step0] x i\n",
1199       "                                                                            [[[1 2] 3] 4] [] • [[] ccons] [_step0] x i\n",
1200       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • [_step0] x i\n",
1201       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • x i\n",
1202       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • dup i i\n",
1203       "                                               [[[1 2] 3] 4] [] [[] ccons] [_step0] [_step0] • i i\n",
1204       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • _step0 i\n",
1205       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
1206       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
1207       "                                                    [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
1208       "                                                    [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
1209       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
1210       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
1211       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
1212       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
1213       "                                                             [[[1 2] 3] 4] [] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
1214       "                                                                            [[[1 2] 3] 4] [] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1215       "                                                                            [[[1 2] 3] 4] [] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1216       "                                                                         [[[1 2] 3] 4] [] [] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1217       "                                                                      [[[1 2] 3] 4] [] false • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1218       "                                                           [[[1 2] 3] 4] [] false [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
1219       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
1220       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
1221       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
1222       "                                           [[[1 2] 3] 4] [] false [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
1223       "                                                           [[[1 2] 3] 4] [] false [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
1224       "                                                           [[[1 2] 3] 4] [] [[] ccons] false • [_step0] swap [popopop] [_stept] branch i\n",
1225       "                                                  [[[1 2] 3] 4] [] [[] ccons] false [_step0] • swap [popopop] [_stept] branch i\n",
1226       "                                                  [[[1 2] 3] 4] [] [[] ccons] [_step0] false • [popopop] [_stept] branch i\n",
1227       "                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] false [popopop] • [_stept] branch i\n",
1228       "                               [[[1 2] 3] 4] [] [[] ccons] [_step0] false [popopop] [_stept] • branch i\n",
1229       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • popopop i\n",
1230       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • pop popop i\n",
1231       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • popop i\n",
1232       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • pop pop i\n",
1233       "                                                                            [[[1 2] 3] 4] [] • pop i\n",
1234       "                                                                               [[[1 2] 3] 4] • i\n",
1235       "                                                                                             • [[1 2] 3] 4\n",
1236       "                                                                                   [[1 2] 3] • 4\n",
1237       "                                                                                 [[1 2] 3] 4 • \n",
1238       "\n",
1239       "[[1 2] 3] 4"
1240      ]
1241     }
1242    ],
1243    "source": [
1244     "1 [2 3 4] [Z] trace"
1245    ]
1246   },
1247   {
1248    "cell_type": "code",
1249    "execution_count": 19,
1250    "metadata": {},
1251    "outputs": [
1252     {
1253      "name": "stdout",
1254      "output_type": "stream",
1255      "text": []
1256     }
1257    ],
1258    "source": [
1259     "clear"
1260    ]
1261   },
1262   {
1263    "cell_type": "markdown",
1264    "metadata": {},
1265    "source": [
1266     "And here it is doing the thing."
1267    ]
1268   },
1269   {
1270    "cell_type": "code",
1271    "execution_count": 20,
1272    "metadata": {},
1273    "outputs": [
1274     {
1275      "name": "stdout",
1276      "output_type": "stream",
1277      "text": [
1278       "[1 [2 [3 4 25 6] 7] 8] [sqr] [dip dip infra dip infra dip infra]"
1279      ]
1280     }
1281    ],
1282    "source": [
1283     "[1 [2 [3 4 25 6] 7] 8] [sqr] [dip dip infra dip infra dip infra]"
1284    ]
1285   },
1286   {
1287    "cell_type": "code",
1288    "execution_count": null,
1289    "metadata": {},
1290    "outputs": [],
1291    "source": [
1292     " [[[] ccons] step i] trace"
1293    ]
1294   },
1295   {
1296    "cell_type": "markdown",
1297    "metadata": {},
1298    "source": [
1299     "## Addressing\n",
1300     "Because we are only using two combinators we could replace the list with a string made from only two characters.\n",
1301     "\n",
1302     "       [...] [Q] 'ddididi' Zstr\n",
1303     "    -------------------------------------------------------------\n",
1304     "       [...] [[[[[[[Q] dip] dip] infra] dip] infra] dip] infra\n",
1305     "\n",
1306     "The string can be considered a name or address for an item in the subject datastructure.\n",
1307     "\n",
1308     "## Determining the right \"path\" for an item in a tree.\n",
1309     "It's easy to read off (in reverse) the right sequence of \"d\" and \"i\" from the subject datastructure:\n",
1310     "\n",
1311     "    [ n [ n [ n n x ...\n",
1312     "    i d i d i d d Bingo!"
1313    ]
1314   }
1315  ],
1316  "metadata": {
1317   "kernelspec": {
1318    "display_name": "Joypy",
1319    "language": "",
1320    "name": "thun"
1321   },
1322   "language_info": {
1323    "file_extension": ".joy",
1324    "mimetype": "text/plain",
1325    "name": "Joy"
1326   }
1327  },
1328  "nbformat": 4,
1329  "nbformat_minor": 2
1330 }