OSDN Git Service

Working on bug #15
[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": "code",
545    "execution_count": null,
546    "metadata": {},
547    "outputs": [],
548    "source": []
549   },
550   {
551    "cell_type": "code",
552    "execution_count": null,
553    "metadata": {},
554    "outputs": [],
555    "source": []
556   },
557   {
558    "cell_type": "code",
559    "execution_count": null,
560    "metadata": {},
561    "outputs": [],
562    "source": []
563   },
564   {
565    "cell_type": "code",
566    "execution_count": null,
567    "metadata": {},
568    "outputs": [],
569    "source": []
570   },
571   {
572    "cell_type": "code",
573    "execution_count": null,
574    "metadata": {},
575    "outputs": [],
576    "source": []
577   },
578   {
579    "cell_type": "code",
580    "execution_count": null,
581    "metadata": {},
582    "outputs": [],
583    "source": []
584   },
585   {
586    "cell_type": "code",
587    "execution_count": null,
588    "metadata": {},
589    "outputs": [],
590    "source": []
591   },
592   {
593    "cell_type": "code",
594    "execution_count": 6,
595    "metadata": {},
596    "outputs": [
597     {
598      "name": "stdout",
599      "output_type": "stream",
600      "text": []
601     }
602    ],
603    "source": [
604     "[Z [[] ccons] step i] inscribe"
605    ]
606   },
607   {
608    "cell_type": "markdown",
609    "metadata": {},
610    "source": [
611     "Here it is in action in a simplified scenario."
612    ]
613   },
614   {
615    "cell_type": "code",
616    "execution_count": 7,
617    "metadata": {},
618    "outputs": [
619     {
620      "name": "stdout",
621      "output_type": "stream",
622      "text": [
623       "                                                                                   1 [2 3 4] • Z\n",
624       "                                                                                   1 [2 3 4] • [[] ccons] step i\n",
625       "                                                                        1 [2 3 4] [[] ccons] • step i\n",
626       "                                                                        1 [2 3 4] [[] ccons] • [_step0] x i\n",
627       "                                                               1 [2 3 4] [[] ccons] [_step0] • x i\n",
628       "                                                               1 [2 3 4] [[] ccons] [_step0] • dup i i\n",
629       "                                                      1 [2 3 4] [[] ccons] [_step0] [_step0] • i i\n",
630       "                                                               1 [2 3 4] [[] ccons] [_step0] • _step0 i\n",
631       "                                                               1 [2 3 4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
632       "                                                               1 [2 3 4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
633       "                                                           1 [2 3 4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
634       "                                                           1 [2 3 4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
635       "                                                     1 [2 3 4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
636       "                                                     1 [2 3 4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
637       "                                                     1 [2 3 4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
638       "                                                                        1 [2 3 4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
639       "                                                                    1 [2 3 4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
640       "                                                                                   1 [2 3 4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
641       "                                                                                   1 [2 3 4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
642       "                                                                           1 [2 3 4] [2 3 4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
643       "                                                                              1 [2 3 4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
644       "                                                                   1 [2 3 4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
645       "                                                          1 [2 3 4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
646       "                                                          1 [2 3 4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
647       "                                                          1 [2 3 4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
648       "                                                   1 [2 3 4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
649       "                                                                   1 [2 3 4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
650       "                                                                   1 [2 3 4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
651       "                                                          1 [2 3 4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
652       "                                                          1 [2 3 4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
653       "                                                1 [2 3 4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
654       "                                       1 [2 3 4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
655       "                                                               1 [2 3 4] [[] ccons] [_step0] • _stept i\n",
656       "                                                               1 [2 3 4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
657       "                                                      1 [2 3 4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
658       "                                                      1 [2 3 4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
659       "                                                1 [2 3 4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
660       "                                                1 [2 3 4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
661       "                                                1 [2 3 4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
662       "                                                                        1 [2 3 4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
663       "                                                               1 [2 3 4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
664       "                                                                                   1 [2 3 4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
665       "                                                                                   1 [2 3 4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
666       "                                                                           1 [2 3 4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
667       "                                                                    1 [2 3 4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
668       "                                                                    1 [2 3 4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
669       "                                                                    1 [2 3 4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
670       "                                                                1 [2 3 4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
671       "                                                                1 [2 3 4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
672       "                                          1 [2 3 4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
673       "                                                                    1 [2 3 4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
674       "                                                                    1 [2 3 4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
675       "                                                       1 [2 3 4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
676       "                                                                           1 [2 3 4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
677       "                                                       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",
678       "                                                       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",
679       "                                                 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",
680       "                                                                           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",
681       "                                                                                   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",
682       "                                                               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",
683       "                                                        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",
684       "                                                        1 [2 3 4] [rest] [[first] [2 3 4] 1] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
685       "                                                        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",
686       "                                           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",
687       "                                                                            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",
688       "                                                         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",
689       "                                                         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",
690       "                                                   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",
691       "                                                                            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",
692       "                                                                                   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",
693       "                                                                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",
694       "                                            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",
695       "                                            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",
696       "                                        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",
697       "                               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",
698       "                               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",
699       "                               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",
700       "                         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",
701       "                         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",
702       "                         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",
703       "                   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",
704       "                               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",
705       "                  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",
706       "            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",
707       "                               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",
708       "                                                               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",
709       "                                                           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",
710       "                                                           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",
711       "                                                           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",
712       "                                                           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",
713       "                                                           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",
714       "                                                           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",
715       "                                                           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",
716       "                                                       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",
717       "                                                                       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",
718       "                                                                           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",
719       "                                                                                   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",
720       "                                                                                         1 2 • [[2 3 4] 1] swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
721       "                                                                             1 2 [[2 3 4] 1] • swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
722       "                                                                             1 [2 3 4] [2 1] • first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
723       "                                                                                 1 [2 3 4] 2 • [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
724       "                                                              1 [2 3 4] 2 [[rest] [2 3 4] 1] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
725       "                                                 1 [2 3 4] 2 [[rest] [2 3 4] 1] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
726       "                                                              1 [2 3 4] 2 [[rest] [2 3 4] 1] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
727       "                                                          1 [2 3 4] 2 [[rest] [2 3 4] 1] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
728       "                                                          1 [2 3 4] 2 [[rest] [2 3 4] 1] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
729       "                                                          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",
730       "                                                          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",
731       "                                                          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",
732       "                                                          1 [2 3 4] 2 [[i] [rest] [2 3 4] 1] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
733       "                                                          1 [2 3 4] [rest] [i] [2 [2 3 4] 1] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
734       "                                                      1 [2 3 4] [rest] [i] [2 [2 3 4] 1] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
735       "                                                                        1 [2 3 4] [rest] [i] • i [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
736       "                                                                            1 [2 3 4] [rest] • i [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
737       "                                                                                   1 [2 3 4] • rest [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
738       "                                                                                   1 [2 3 4] • [pop] infra [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
739       "                                                                             1 [2 3 4] [pop] • infra [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
740       "                                                                             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",
741       "                                                                             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",
742       "                                                                             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",
743       "                                                                             1 [[pop] 2 3 4] • swaack [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
744       "                                                                             4 3 2 [pop] [1] • [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
745       "                                                                         4 3 2 [pop] [1] [i] • dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
746       "                                                                                 4 3 2 [pop] • i [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
747       "                                                                                       4 3 2 • pop [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
748       "                                                                                         4 3 • [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
749       "                                                                                     4 3 [1] • swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
750       "                                                                                     1 [3 4] • [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
751       "                                                                       1 [3 4] [2 [2 3 4] 1] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
752       "                                                                       1 [2 3 4] 2 [[3 4] 1] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
753       "                                                                           1 [2 3 4] 2 [3 4] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
754       "                                                                           1 [2 3 4] 2 [3 4] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
755       "                                                                     1 [2 3 4] 2 [3 4] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
756       "                                                                     1 [2 3 4] 2 [3 4] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
757       "                                                               1 [2 3 4] 2 [3 4] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
758       "                                                               1 [2 3 4] 2 [3 4] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
759       "                                                               1 [2 3 4] 2 [3 4] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
760       "                                                                                 1 [2 3 4] 2 • [pop] dip [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
761       "                                                                           1 [2 3 4] 2 [pop] • dip [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
762       "                                                                                   1 [2 3 4] • pop 2 [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
763       "                                                                                           1 • 2 [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
764       "                                                                                         1 2 • [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
765       "                                                                                   1 2 [3 4] • [[] ccons] [_step0] [dupdipd] dip x i\n",
766       "                                                                        1 2 [3 4] [[] ccons] • [_step0] [dupdipd] dip x i\n",
767       "                                                               1 2 [3 4] [[] ccons] [_step0] • [dupdipd] dip x i\n",
768       "                                                     1 2 [3 4] [[] ccons] [_step0] [dupdipd] • dip x i\n",
769       "                                                                        1 2 [3 4] [[] ccons] • dupdipd [_step0] x i\n",
770       "                                                                        1 2 [3 4] [[] ccons] • dup dipd [_step0] x i\n",
771       "                                                             1 2 [3 4] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
772       "                                                             1 2 [3 4] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
773       "                                                       1 2 [3 4] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
774       "                                                       1 2 [3 4] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
775       "                                                       1 2 [3 4] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
776       "                                                                                   1 2 [3 4] • [[] ccons] dip [[] ccons] [_step0] x i\n",
777       "                                                                        1 2 [3 4] [[] ccons] • dip [[] ccons] [_step0] x i\n",
778       "                                                                                         1 2 • [] ccons [3 4] [[] ccons] [_step0] x i\n",
779       "                                                                                      1 2 [] • ccons [3 4] [[] ccons] [_step0] x i\n",
780       "                                                                                      1 2 [] • cons cons [3 4] [[] ccons] [_step0] x i\n",
781       "                                                                                       1 [2] • cons [3 4] [[] ccons] [_step0] x i\n",
782       "                                                                                       [1 2] • [3 4] [[] ccons] [_step0] x i\n",
783       "                                                                                 [1 2] [3 4] • [[] ccons] [_step0] x i\n",
784       "                                                                      [1 2] [3 4] [[] ccons] • [_step0] x i\n",
785       "                                                             [1 2] [3 4] [[] ccons] [_step0] • x i\n",
786       "                                                             [1 2] [3 4] [[] ccons] [_step0] • dup i i\n",
787       "                                                    [1 2] [3 4] [[] ccons] [_step0] [_step0] • i i\n",
788       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _step0 i\n",
789       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
790       "                                                             [1 2] [3 4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
791       "                                                         [1 2] [3 4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
792       "                                                         [1 2] [3 4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
793       "                                                   [1 2] [3 4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
794       "                                                   [1 2] [3 4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
795       "                                                   [1 2] [3 4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
796       "                                                                      [1 2] [3 4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
797       "                                                                  [1 2] [3 4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
798       "                                                                                 [1 2] [3 4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
799       "                                                                                 [1 2] [3 4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
800       "                                                                           [1 2] [3 4] [3 4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
801       "                                                                            [1 2] [3 4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
802       "                                                                 [1 2] [3 4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
803       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
804       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
805       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
806       "                                                 [1 2] [3 4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
807       "                                                                 [1 2] [3 4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
808       "                                                                 [1 2] [3 4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
809       "                                                        [1 2] [3 4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
810       "                                                        [1 2] [3 4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
811       "                                              [1 2] [3 4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
812       "                                     [1 2] [3 4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
813       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _stept i\n",
814       "                                                             [1 2] [3 4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
815       "                                                    [1 2] [3 4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
816       "                                                    [1 2] [3 4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
817       "                                              [1 2] [3 4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
818       "                                              [1 2] [3 4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
819       "                                              [1 2] [3 4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
820       "                                                                      [1 2] [3 4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
821       "                                                             [1 2] [3 4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
822       "                                                                                 [1 2] [3 4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
823       "                                                                                 [1 2] [3 4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
824       "                                                                         [1 2] [3 4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
825       "                                                                  [1 2] [3 4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
826       "                                                                  [1 2] [3 4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
827       "                                                                  [1 2] [3 4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
828       "                                                              [1 2] [3 4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
829       "                                                              [1 2] [3 4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
830       "                                        [1 2] [3 4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
831       "                                                                  [1 2] [3 4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
832       "                                                                  [1 2] [3 4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
833       "                                                     [1 2] [3 4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
834       "                                                                         [1 2] [3 4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
835       "                                                   [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",
836       "                                                   [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",
837       "                                             [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",
838       "                                                                         [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",
839       "                                                                                 [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",
840       "                                                           [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",
841       "                                                    [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",
842       "                                                    [1 2] [3 4] [rest] [[first] [3 4] [1 2]] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
843       "                                                    [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",
844       "                                       [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",
845       "                                                                          [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",
846       "                                                     [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",
847       "                                                     [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",
848       "                                               [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",
849       "                                                                          [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",
850       "                                                                                 [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",
851       "                                                            [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",
852       "                                      [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",
853       "                                      [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",
854       "                                  [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",
855       "                         [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",
856       "                         [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",
857       "                         [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",
858       "                   [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",
859       "                   [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",
860       "                   [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",
861       "             [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",
862       "                         [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",
863       "            [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",
864       "      [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",
865       "                         [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",
866       "                                                           [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",
867       "                                                       [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",
868       "                                                       [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",
869       "                                                       [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",
870       "                                                       [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",
871       "                                                       [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",
872       "                                                       [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",
873       "                                                       [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",
874       "                                                   [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",
875       "                                                                     [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",
876       "                                                                         [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",
877       "                                                                                 [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",
878       "                                                                                     [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",
879       "                                                                       [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",
880       "                                                                       [1 2] [3 4] [3 [1 2]] • first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
881       "                                                                               [1 2] [3 4] 3 • [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
882       "                                                          [1 2] [3 4] 3 [[rest] [3 4] [1 2]] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
883       "                                             [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
884       "                                                          [1 2] [3 4] 3 [[rest] [3 4] [1 2]] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
885       "                                                      [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
886       "                                                      [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
887       "                                                      [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",
888       "                                                      [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",
889       "                                                      [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",
890       "                                                      [1 2] [3 4] 3 [[i] [rest] [3 4] [1 2]] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
891       "                                                      [1 2] [3 4] [rest] [i] [3 [3 4] [1 2]] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
892       "                                                  [1 2] [3 4] [rest] [i] [3 [3 4] [1 2]] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
893       "                                                                      [1 2] [3 4] [rest] [i] • i [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
894       "                                                                          [1 2] [3 4] [rest] • i [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
895       "                                                                                 [1 2] [3 4] • rest [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
896       "                                                                                 [1 2] [3 4] • [pop] infra [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
897       "                                                                           [1 2] [3 4] [pop] • infra [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
898       "                                                                           [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",
899       "                                                                           [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",
900       "                                                                           [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",
901       "                                                                           [1 2] [[pop] 3 4] • swaack [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
902       "                                                                           4 3 [pop] [[1 2]] • [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
903       "                                                                       4 3 [pop] [[1 2]] [i] • dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
904       "                                                                                   4 3 [pop] • i [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
905       "                                                                                         4 3 • pop [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
906       "                                                                                           4 • [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
907       "                                                                                   4 [[1 2]] • swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
908       "                                                                                   [1 2] [4] • [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
909       "                                                                   [1 2] [4] [3 [3 4] [1 2]] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
910       "                                                                   [1 2] [3 4] 3 [[4] [1 2]] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
911       "                                                                           [1 2] [3 4] 3 [4] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
912       "                                                                           [1 2] [3 4] 3 [4] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
913       "                                                                     [1 2] [3 4] 3 [4] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
914       "                                                                     [1 2] [3 4] 3 [4] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
915       "                                                               [1 2] [3 4] 3 [4] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
916       "                                                               [1 2] [3 4] 3 [4] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
917       "                                                               [1 2] [3 4] 3 [4] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
918       "                                                                               [1 2] [3 4] 3 • [pop] dip [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
919       "                                                                         [1 2] [3 4] 3 [pop] • dip [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
920       "                                                                                 [1 2] [3 4] • pop 3 [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
921       "                                                                                       [1 2] • 3 [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
922       "                                                                                     [1 2] 3 • [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
923       "                                                                                 [1 2] 3 [4] • [[] ccons] [_step0] [dupdipd] dip x i\n",
924       "                                                                      [1 2] 3 [4] [[] ccons] • [_step0] [dupdipd] dip x i\n",
925       "                                                             [1 2] 3 [4] [[] ccons] [_step0] • [dupdipd] dip x i\n",
926       "                                                   [1 2] 3 [4] [[] ccons] [_step0] [dupdipd] • dip x i\n",
927       "                                                                      [1 2] 3 [4] [[] ccons] • dupdipd [_step0] x i\n",
928       "                                                                      [1 2] 3 [4] [[] ccons] • dup dipd [_step0] x i\n",
929       "                                                           [1 2] 3 [4] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
930       "                                                           [1 2] 3 [4] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
931       "                                                     [1 2] 3 [4] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
932       "                                                     [1 2] 3 [4] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
933       "                                                     [1 2] 3 [4] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
934       "                                                                                 [1 2] 3 [4] • [[] ccons] dip [[] ccons] [_step0] x i\n",
935       "                                                                      [1 2] 3 [4] [[] ccons] • dip [[] ccons] [_step0] x i\n",
936       "                                                                                     [1 2] 3 • [] ccons [4] [[] ccons] [_step0] x i\n",
937       "                                                                                  [1 2] 3 [] • ccons [4] [[] ccons] [_step0] x i\n",
938       "                                                                                  [1 2] 3 [] • cons cons [4] [[] ccons] [_step0] x i\n",
939       "                                                                                   [1 2] [3] • cons [4] [[] ccons] [_step0] x i\n",
940       "                                                                                   [[1 2] 3] • [4] [[] ccons] [_step0] x i\n",
941       "                                                                               [[1 2] 3] [4] • [[] ccons] [_step0] x i\n",
942       "                                                                    [[1 2] 3] [4] [[] ccons] • [_step0] x i\n",
943       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • x i\n",
944       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • dup i i\n",
945       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [_step0] • i i\n",
946       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _step0 i\n",
947       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
948       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
949       "                                                       [[1 2] 3] [4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
950       "                                                       [[1 2] 3] [4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
951       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
952       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
953       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
954       "                                                                    [[1 2] 3] [4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
955       "                                                                [[1 2] 3] [4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
956       "                                                                               [[1 2] 3] [4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
957       "                                                                               [[1 2] 3] [4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
958       "                                                                           [[1 2] 3] [4] [4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
959       "                                                                          [[1 2] 3] [4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
960       "                                                               [[1 2] 3] [4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
961       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
962       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
963       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
964       "                                               [[1 2] 3] [4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
965       "                                                               [[1 2] 3] [4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
966       "                                                               [[1 2] 3] [4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
967       "                                                      [[1 2] 3] [4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
968       "                                                      [[1 2] 3] [4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
969       "                                            [[1 2] 3] [4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
970       "                                   [[1 2] 3] [4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
971       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _stept i\n",
972       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
973       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
974       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
975       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
976       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
977       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
978       "                                                                    [[1 2] 3] [4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
979       "                                                           [[1 2] 3] [4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
980       "                                                                               [[1 2] 3] [4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
981       "                                                                               [[1 2] 3] [4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
982       "                                                                       [[1 2] 3] [4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
983       "                                                                [[1 2] 3] [4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
984       "                                                                [[1 2] 3] [4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
985       "                                                                [[1 2] 3] [4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
986       "                                                            [[1 2] 3] [4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
987       "                                                            [[1 2] 3] [4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
988       "                                      [[1 2] 3] [4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
989       "                                                                [[1 2] 3] [4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
990       "                                                                [[1 2] 3] [4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
991       "                                                   [[1 2] 3] [4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
992       "                                                                       [[1 2] 3] [4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
993       "                                               [[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",
994       "                                               [[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",
995       "                                         [[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",
996       "                                                                       [[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",
997       "                                                                               [[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",
998       "                                                       [[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",
999       "                                                [[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",
1000       "                                                [[1 2] 3] [4] [rest] [[first] [4] [[1 2] 3]] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1001       "                                                [[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",
1002       "                                   [[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",
1003       "                                                                        [[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",
1004       "                                                 [[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",
1005       "                                                 [[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",
1006       "                                           [[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",
1007       "                                                                        [[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",
1008       "                                                                               [[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",
1009       "                                                        [[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",
1010       "                                [[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",
1011       "                                [[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",
1012       "                            [[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",
1013       "                   [[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",
1014       "                   [[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",
1015       "                   [[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",
1016       "             [[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",
1017       "             [[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",
1018       "             [[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",
1019       "       [[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",
1020       "                   [[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",
1021       "      [[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",
1022       "[[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",
1023       "                   [[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",
1024       "                                                       [[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",
1025       "                                                   [[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",
1026       "                                                   [[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",
1027       "                                                   [[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",
1028       "                                                   [[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",
1029       "                                                   [[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",
1030       "                                                   [[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",
1031       "                                                   [[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",
1032       "                                               [[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",
1033       "                                                                   [[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",
1034       "                                                                       [[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",
1035       "                                                                               [[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",
1036       "                                                                                 [[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",
1037       "                                                                 [[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",
1038       "                                                                 [[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",
1039       "                                                                             [[1 2] 3] [4] 4 • [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1040       "                                                      [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1041       "                                         [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1042       "                                                      [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1043       "                                                  [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1044       "                                                  [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1045       "                                                  [[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",
1046       "                                                  [[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",
1047       "                                                  [[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",
1048       "                                                  [[1 2] 3] [4] 4 [[i] [rest] [4] [[1 2] 3]] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1049       "                                                  [[1 2] 3] [4] [rest] [i] [4 [4] [[1 2] 3]] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1050       "                                              [[1 2] 3] [4] [rest] [i] [4 [4] [[1 2] 3]] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1051       "                                                                    [[1 2] 3] [4] [rest] [i] • i [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1052       "                                                                        [[1 2] 3] [4] [rest] • i [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1053       "                                                                               [[1 2] 3] [4] • rest [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1054       "                                                                               [[1 2] 3] [4] • [pop] infra [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1055       "                                                                         [[1 2] 3] [4] [pop] • infra [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1056       "                                                                         [[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",
1057       "                                                                         [[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",
1058       "                                                                         [[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",
1059       "                                                                         [[1 2] 3] [[pop] 4] • swaack [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1060       "                                                                         4 [pop] [[[1 2] 3]] • [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1061       "                                                                     4 [pop] [[[1 2] 3]] [i] • dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1062       "                                                                                     4 [pop] • i [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1063       "                                                                                           4 • pop [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1064       "                                                                                             • [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1065       "                                                                                 [[[1 2] 3]] • swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1066       "                                                                                [[1 2] 3] [] • [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1067       "                                                              [[1 2] 3] [] [4 [4] [[1 2] 3]] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1068       "                                                              [[1 2] 3] [4] 4 [[] [[1 2] 3]] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1069       "                                                                          [[1 2] 3] [4] 4 [] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
1070       "                                                                          [[1 2] 3] [4] 4 [] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
1071       "                                                                    [[1 2] 3] [4] 4 [] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
1072       "                                                                    [[1 2] 3] [4] 4 [] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
1073       "                                                              [[1 2] 3] [4] 4 [] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
1074       "                                                              [[1 2] 3] [4] 4 [] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
1075       "                                                              [[1 2] 3] [4] 4 [] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
1076       "                                                                             [[1 2] 3] [4] 4 • [pop] dip [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1077       "                                                                       [[1 2] 3] [4] 4 [pop] • dip [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1078       "                                                                               [[1 2] 3] [4] • pop 4 [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1079       "                                                                                   [[1 2] 3] • 4 [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1080       "                                                                                 [[1 2] 3] 4 • [] [[] ccons] [_step0] [dupdipd] dip x i\n",
1081       "                                                                              [[1 2] 3] 4 [] • [[] ccons] [_step0] [dupdipd] dip x i\n",
1082       "                                                                   [[1 2] 3] 4 [] [[] ccons] • [_step0] [dupdipd] dip x i\n",
1083       "                                                          [[1 2] 3] 4 [] [[] ccons] [_step0] • [dupdipd] dip x i\n",
1084       "                                                [[1 2] 3] 4 [] [[] ccons] [_step0] [dupdipd] • dip x i\n",
1085       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dupdipd [_step0] x i\n",
1086       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dup dipd [_step0] x i\n",
1087       "                                                        [[1 2] 3] 4 [] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
1088       "                                                        [[1 2] 3] 4 [] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
1089       "                                                  [[1 2] 3] 4 [] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
1090       "                                                  [[1 2] 3] 4 [] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
1091       "                                                  [[1 2] 3] 4 [] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
1092       "                                                                              [[1 2] 3] 4 [] • [[] ccons] dip [[] ccons] [_step0] x i\n",
1093       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dip [[] ccons] [_step0] x i\n",
1094       "                                                                                 [[1 2] 3] 4 • [] ccons [] [[] ccons] [_step0] x i\n",
1095       "                                                                              [[1 2] 3] 4 [] • ccons [] [[] ccons] [_step0] x i\n",
1096       "                                                                              [[1 2] 3] 4 [] • cons cons [] [[] ccons] [_step0] x i\n",
1097       "                                                                               [[1 2] 3] [4] • cons [] [[] ccons] [_step0] x i\n",
1098       "                                                                               [[[1 2] 3] 4] • [] [[] ccons] [_step0] x i\n",
1099       "                                                                            [[[1 2] 3] 4] [] • [[] ccons] [_step0] x i\n",
1100       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • [_step0] x i\n",
1101       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • x i\n",
1102       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • dup i i\n",
1103       "                                               [[[1 2] 3] 4] [] [[] ccons] [_step0] [_step0] • i i\n",
1104       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • _step0 i\n",
1105       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
1106       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
1107       "                                                    [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
1108       "                                                    [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
1109       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
1110       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
1111       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
1112       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
1113       "                                                             [[[1 2] 3] 4] [] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
1114       "                                                                            [[[1 2] 3] 4] [] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1115       "                                                                            [[[1 2] 3] 4] [] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1116       "                                                                         [[[1 2] 3] 4] [] [] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1117       "                                                                      [[[1 2] 3] 4] [] false • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
1118       "                                                           [[[1 2] 3] 4] [] false [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
1119       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
1120       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
1121       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
1122       "                                           [[[1 2] 3] 4] [] false [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
1123       "                                                           [[[1 2] 3] 4] [] false [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
1124       "                                                           [[[1 2] 3] 4] [] [[] ccons] false • [_step0] swap [popopop] [_stept] branch i\n",
1125       "                                                  [[[1 2] 3] 4] [] [[] ccons] false [_step0] • swap [popopop] [_stept] branch i\n",
1126       "                                                  [[[1 2] 3] 4] [] [[] ccons] [_step0] false • [popopop] [_stept] branch i\n",
1127       "                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] false [popopop] • [_stept] branch i\n",
1128       "                               [[[1 2] 3] 4] [] [[] ccons] [_step0] false [popopop] [_stept] • branch i\n",
1129       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • popopop i\n",
1130       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • pop popop i\n",
1131       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • popop i\n",
1132       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • pop pop i\n",
1133       "                                                                            [[[1 2] 3] 4] [] • pop i\n",
1134       "                                                                               [[[1 2] 3] 4] • i\n",
1135       "                                                                                             • [[1 2] 3] 4\n",
1136       "                                                                                   [[1 2] 3] • 4\n",
1137       "                                                                                 [[1 2] 3] 4 • \n",
1138       "\n",
1139       "[[1 2] 3] 4"
1140      ]
1141     }
1142    ],
1143    "source": [
1144     "1 [2 3 4] [Z] trace"
1145    ]
1146   },
1147   {
1148    "cell_type": "code",
1149    "execution_count": 19,
1150    "metadata": {},
1151    "outputs": [
1152     {
1153      "name": "stdout",
1154      "output_type": "stream",
1155      "text": []
1156     }
1157    ],
1158    "source": [
1159     "clear"
1160    ]
1161   },
1162   {
1163    "cell_type": "markdown",
1164    "metadata": {},
1165    "source": [
1166     "And here it is doing the thing."
1167    ]
1168   },
1169   {
1170    "cell_type": "code",
1171    "execution_count": 20,
1172    "metadata": {},
1173    "outputs": [
1174     {
1175      "name": "stdout",
1176      "output_type": "stream",
1177      "text": [
1178       "[1 [2 [3 4 25 6] 7] 8] [sqr] [dip dip infra dip infra dip infra]"
1179      ]
1180     }
1181    ],
1182    "source": [
1183     "[1 [2 [3 4 25 6] 7] 8] [sqr] [dip dip infra dip infra dip infra]"
1184    ]
1185   },
1186   {
1187    "cell_type": "code",
1188    "execution_count": null,
1189    "metadata": {},
1190    "outputs": [],
1191    "source": [
1192     " [[[] ccons] step i] trace"
1193    ]
1194   },
1195   {
1196    "cell_type": "markdown",
1197    "metadata": {},
1198    "source": [
1199     "## Addressing\n",
1200     "Because we are only using two combinators we could replace the list with a string made from only two characters.\n",
1201     "\n",
1202     "       [...] [Q] 'ddididi' Zstr\n",
1203     "    -------------------------------------------------------------\n",
1204     "       [...] [[[[[[[Q] dip] dip] infra] dip] infra] dip] infra\n",
1205     "\n",
1206     "The string can be considered a name or address for an item in the subject datastructure.\n",
1207     "\n",
1208     "## Determining the right \"path\" for an item in a tree.\n",
1209     "It's easy to read off (in reverse) the right sequence of \"d\" and \"i\" from the subject datastructure:\n",
1210     "\n",
1211     "    [ n [ n [ n n x ...\n",
1212     "    i d i d i d d Bingo!"
1213    ]
1214   }
1215  ],
1216  "metadata": {
1217   "kernelspec": {
1218    "display_name": "Joypy",
1219    "language": "",
1220    "name": "thun"
1221   },
1222   "language_info": {
1223    "file_extension": ".joy",
1224    "mimetype": "text/plain",
1225    "name": "Joy"
1226   }
1227  },
1228  "nbformat": 4,
1229  "nbformat_minor": 2
1230 }