OSDN Git Service

Tightening up the debug script.
[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": 15,
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": 6,
372    "metadata": {},
373    "outputs": [
374     {
375      "name": "stdout",
376      "output_type": "stream",
377      "text": []
378     }
379    ],
380    "source": [
381     "[Z [[] ccons] step i] inscribe"
382    ]
383   },
384   {
385    "cell_type": "markdown",
386    "metadata": {},
387    "source": [
388     "Here it is in action in a simplified scenario."
389    ]
390   },
391   {
392    "cell_type": "code",
393    "execution_count": 7,
394    "metadata": {},
395    "outputs": [
396     {
397      "name": "stdout",
398      "output_type": "stream",
399      "text": [
400       "                                                                                   1 [2 3 4] • Z\n",
401       "                                                                                   1 [2 3 4] • [[] ccons] step i\n",
402       "                                                                        1 [2 3 4] [[] ccons] • step i\n",
403       "                                                                        1 [2 3 4] [[] ccons] • [_step0] x i\n",
404       "                                                               1 [2 3 4] [[] ccons] [_step0] • x i\n",
405       "                                                               1 [2 3 4] [[] ccons] [_step0] • dup i i\n",
406       "                                                      1 [2 3 4] [[] ccons] [_step0] [_step0] • i i\n",
407       "                                                               1 [2 3 4] [[] ccons] [_step0] • _step0 i\n",
408       "                                                               1 [2 3 4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
409       "                                                               1 [2 3 4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
410       "                                                           1 [2 3 4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
411       "                                                           1 [2 3 4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
412       "                                                     1 [2 3 4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
413       "                                                     1 [2 3 4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
414       "                                                     1 [2 3 4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
415       "                                                                        1 [2 3 4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
416       "                                                                    1 [2 3 4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
417       "                                                                                   1 [2 3 4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
418       "                                                                                   1 [2 3 4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
419       "                                                                           1 [2 3 4] [2 3 4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
420       "                                                                              1 [2 3 4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
421       "                                                                   1 [2 3 4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
422       "                                                          1 [2 3 4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
423       "                                                          1 [2 3 4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
424       "                                                          1 [2 3 4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
425       "                                                   1 [2 3 4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
426       "                                                                   1 [2 3 4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
427       "                                                                   1 [2 3 4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
428       "                                                          1 [2 3 4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
429       "                                                          1 [2 3 4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
430       "                                                1 [2 3 4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
431       "                                       1 [2 3 4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
432       "                                                               1 [2 3 4] [[] ccons] [_step0] • _stept i\n",
433       "                                                               1 [2 3 4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
434       "                                                      1 [2 3 4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
435       "                                                      1 [2 3 4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
436       "                                                1 [2 3 4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
437       "                                                1 [2 3 4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
438       "                                                1 [2 3 4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
439       "                                                                        1 [2 3 4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
440       "                                                               1 [2 3 4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
441       "                                                                                   1 [2 3 4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
442       "                                                                                   1 [2 3 4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
443       "                                                                           1 [2 3 4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
444       "                                                                    1 [2 3 4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
445       "                                                                    1 [2 3 4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
446       "                                                                    1 [2 3 4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
447       "                                                                1 [2 3 4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
448       "                                                                1 [2 3 4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
449       "                                          1 [2 3 4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
450       "                                                                    1 [2 3 4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
451       "                                                                    1 [2 3 4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
452       "                                                       1 [2 3 4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
453       "                                                                           1 [2 3 4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
454       "                                                       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",
455       "                                                       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",
456       "                                                 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",
457       "                                                                           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",
458       "                                                                                   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",
459       "                                                               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",
460       "                                                        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",
461       "                                                        1 [2 3 4] [rest] [[first] [2 3 4] 1] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
462       "                                                        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",
463       "                                           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",
464       "                                                                            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",
465       "                                                         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",
466       "                                                         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",
467       "                                                   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",
468       "                                                                            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",
469       "                                                                                   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",
470       "                                                                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",
471       "                                            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",
472       "                                            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",
473       "                                        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",
474       "                               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",
475       "                               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",
476       "                               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",
477       "                         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",
478       "                         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",
479       "                         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",
480       "                   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",
481       "                               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",
482       "                  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",
483       "            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",
484       "                               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",
485       "                                                               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",
486       "                                                           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",
487       "                                                           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",
488       "                                                           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",
489       "                                                           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",
490       "                                                           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",
491       "                                                           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",
492       "                                                           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",
493       "                                                       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",
494       "                                                                       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",
495       "                                                                           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",
496       "                                                                                   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",
497       "                                                                                         1 2 • [[2 3 4] 1] swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
498       "                                                                             1 2 [[2 3 4] 1] • swaack first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
499       "                                                                             1 [2 3 4] [2 1] • first [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
500       "                                                                                 1 [2 3 4] 2 • [[rest] [2 3 4] 1] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
501       "                                                              1 [2 3 4] 2 [[rest] [2 3 4] 1] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
502       "                                                 1 [2 3 4] 2 [[rest] [2 3 4] 1] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
503       "                                                              1 [2 3 4] 2 [[rest] [2 3 4] 1] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
504       "                                                          1 [2 3 4] 2 [[rest] [2 3 4] 1] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
505       "                                                          1 [2 3 4] 2 [[rest] [2 3 4] 1] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
506       "                                                          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",
507       "                                                          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",
508       "                                                          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",
509       "                                                          1 [2 3 4] 2 [[i] [rest] [2 3 4] 1] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
510       "                                                          1 [2 3 4] [rest] [i] [2 [2 3 4] 1] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
511       "                                                      1 [2 3 4] [rest] [i] [2 [2 3 4] 1] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
512       "                                                                        1 [2 3 4] [rest] [i] • i [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
513       "                                                                            1 [2 3 4] [rest] • i [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
514       "                                                                                   1 [2 3 4] • rest [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
515       "                                                                                   1 [2 3 4] • [pop] infra [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
516       "                                                                             1 [2 3 4] [pop] • infra [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
517       "                                                                             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",
518       "                                                                             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",
519       "                                                                             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",
520       "                                                                             1 [[pop] 2 3 4] • swaack [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
521       "                                                                             4 3 2 [pop] [1] • [i] dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
522       "                                                                         4 3 2 [pop] [1] [i] • dip swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
523       "                                                                                 4 3 2 [pop] • i [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
524       "                                                                                       4 3 2 • pop [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
525       "                                                                                         4 3 • [1] swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
526       "                                                                                     4 3 [1] • swaack [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
527       "                                                                                     1 [3 4] • [2 [2 3 4] 1] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
528       "                                                                       1 [3 4] [2 [2 3 4] 1] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
529       "                                                                       1 [2 3 4] 2 [[3 4] 1] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
530       "                                                                           1 [2 3 4] 2 [3 4] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
531       "                                                                           1 [2 3 4] 2 [3 4] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
532       "                                                                     1 [2 3 4] 2 [3 4] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
533       "                                                                     1 [2 3 4] 2 [3 4] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
534       "                                                               1 [2 3 4] 2 [3 4] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
535       "                                                               1 [2 3 4] 2 [3 4] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
536       "                                                               1 [2 3 4] 2 [3 4] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
537       "                                                                                 1 [2 3 4] 2 • [pop] dip [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
538       "                                                                           1 [2 3 4] 2 [pop] • dip [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
539       "                                                                                   1 [2 3 4] • pop 2 [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
540       "                                                                                           1 • 2 [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
541       "                                                                                         1 2 • [3 4] [[] ccons] [_step0] [dupdipd] dip x i\n",
542       "                                                                                   1 2 [3 4] • [[] ccons] [_step0] [dupdipd] dip x i\n",
543       "                                                                        1 2 [3 4] [[] ccons] • [_step0] [dupdipd] dip x i\n",
544       "                                                               1 2 [3 4] [[] ccons] [_step0] • [dupdipd] dip x i\n",
545       "                                                     1 2 [3 4] [[] ccons] [_step0] [dupdipd] • dip x i\n",
546       "                                                                        1 2 [3 4] [[] ccons] • dupdipd [_step0] x i\n",
547       "                                                                        1 2 [3 4] [[] ccons] • dup dipd [_step0] x i\n",
548       "                                                             1 2 [3 4] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
549       "                                                             1 2 [3 4] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
550       "                                                       1 2 [3 4] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
551       "                                                       1 2 [3 4] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
552       "                                                       1 2 [3 4] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
553       "                                                                                   1 2 [3 4] • [[] ccons] dip [[] ccons] [_step0] x i\n",
554       "                                                                        1 2 [3 4] [[] ccons] • dip [[] ccons] [_step0] x i\n",
555       "                                                                                         1 2 • [] ccons [3 4] [[] ccons] [_step0] x i\n",
556       "                                                                                      1 2 [] • ccons [3 4] [[] ccons] [_step0] x i\n",
557       "                                                                                      1 2 [] • cons cons [3 4] [[] ccons] [_step0] x i\n",
558       "                                                                                       1 [2] • cons [3 4] [[] ccons] [_step0] x i\n",
559       "                                                                                       [1 2] • [3 4] [[] ccons] [_step0] x i\n",
560       "                                                                                 [1 2] [3 4] • [[] ccons] [_step0] x i\n",
561       "                                                                      [1 2] [3 4] [[] ccons] • [_step0] x i\n",
562       "                                                             [1 2] [3 4] [[] ccons] [_step0] • x i\n",
563       "                                                             [1 2] [3 4] [[] ccons] [_step0] • dup i i\n",
564       "                                                    [1 2] [3 4] [[] ccons] [_step0] [_step0] • i i\n",
565       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _step0 i\n",
566       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
567       "                                                             [1 2] [3 4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
568       "                                                         [1 2] [3 4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
569       "                                                         [1 2] [3 4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
570       "                                                   [1 2] [3 4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
571       "                                                   [1 2] [3 4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
572       "                                                   [1 2] [3 4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
573       "                                                                      [1 2] [3 4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
574       "                                                                  [1 2] [3 4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
575       "                                                                                 [1 2] [3 4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
576       "                                                                                 [1 2] [3 4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
577       "                                                                           [1 2] [3 4] [3 4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
578       "                                                                            [1 2] [3 4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
579       "                                                                 [1 2] [3 4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
580       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
581       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
582       "                                                        [1 2] [3 4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
583       "                                                 [1 2] [3 4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
584       "                                                                 [1 2] [3 4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
585       "                                                                 [1 2] [3 4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
586       "                                                        [1 2] [3 4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
587       "                                                        [1 2] [3 4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
588       "                                              [1 2] [3 4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
589       "                                     [1 2] [3 4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
590       "                                                             [1 2] [3 4] [[] ccons] [_step0] • _stept i\n",
591       "                                                             [1 2] [3 4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
592       "                                                    [1 2] [3 4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
593       "                                                    [1 2] [3 4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
594       "                                              [1 2] [3 4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
595       "                                              [1 2] [3 4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
596       "                                              [1 2] [3 4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
597       "                                                                      [1 2] [3 4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
598       "                                                             [1 2] [3 4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
599       "                                                                                 [1 2] [3 4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
600       "                                                                                 [1 2] [3 4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
601       "                                                                         [1 2] [3 4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
602       "                                                                  [1 2] [3 4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
603       "                                                                  [1 2] [3 4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
604       "                                                                  [1 2] [3 4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
605       "                                                              [1 2] [3 4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
606       "                                                              [1 2] [3 4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
607       "                                        [1 2] [3 4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
608       "                                                                  [1 2] [3 4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
609       "                                                                  [1 2] [3 4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
610       "                                                     [1 2] [3 4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
611       "                                                                         [1 2] [3 4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
612       "                                                   [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",
613       "                                                   [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",
614       "                                             [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",
615       "                                                                         [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",
616       "                                                                                 [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",
617       "                                                           [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",
618       "                                                    [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",
619       "                                                    [1 2] [3 4] [rest] [[first] [3 4] [1 2]] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
620       "                                                    [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",
621       "                                       [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",
622       "                                                                          [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",
623       "                                                     [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",
624       "                                                     [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",
625       "                                               [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",
626       "                                                                          [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",
627       "                                                                                 [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",
628       "                                                            [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",
629       "                                      [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",
630       "                                      [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",
631       "                                  [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",
632       "                         [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",
633       "                         [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",
634       "                         [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",
635       "                   [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",
636       "                   [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",
637       "                   [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",
638       "             [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",
639       "                         [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",
640       "            [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",
641       "      [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",
642       "                         [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",
643       "                                                           [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",
644       "                                                       [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",
645       "                                                       [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",
646       "                                                       [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",
647       "                                                       [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",
648       "                                                       [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",
649       "                                                       [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",
650       "                                                       [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",
651       "                                                   [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",
652       "                                                                     [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",
653       "                                                                         [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",
654       "                                                                                 [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",
655       "                                                                                     [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",
656       "                                                                       [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",
657       "                                                                       [1 2] [3 4] [3 [1 2]] • first [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
658       "                                                                               [1 2] [3 4] 3 • [[rest] [3 4] [1 2]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
659       "                                                          [1 2] [3 4] 3 [[rest] [3 4] [1 2]] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
660       "                                             [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
661       "                                                          [1 2] [3 4] 3 [[rest] [3 4] [1 2]] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
662       "                                                      [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
663       "                                                      [1 2] [3 4] 3 [[rest] [3 4] [1 2]] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
664       "                                                      [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",
665       "                                                      [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",
666       "                                                      [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",
667       "                                                      [1 2] [3 4] 3 [[i] [rest] [3 4] [1 2]] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
668       "                                                      [1 2] [3 4] [rest] [i] [3 [3 4] [1 2]] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
669       "                                                  [1 2] [3 4] [rest] [i] [3 [3 4] [1 2]] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
670       "                                                                      [1 2] [3 4] [rest] [i] • i [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
671       "                                                                          [1 2] [3 4] [rest] • i [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
672       "                                                                                 [1 2] [3 4] • rest [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
673       "                                                                                 [1 2] [3 4] • [pop] infra [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
674       "                                                                           [1 2] [3 4] [pop] • infra [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
675       "                                                                           [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",
676       "                                                                           [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",
677       "                                                                           [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",
678       "                                                                           [1 2] [[pop] 3 4] • swaack [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
679       "                                                                           4 3 [pop] [[1 2]] • [i] dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
680       "                                                                       4 3 [pop] [[1 2]] [i] • dip swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
681       "                                                                                   4 3 [pop] • i [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
682       "                                                                                         4 3 • pop [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
683       "                                                                                           4 • [[1 2]] swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
684       "                                                                                   4 [[1 2]] • swaack [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
685       "                                                                                   [1 2] [4] • [3 [3 4] [1 2]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
686       "                                                                   [1 2] [4] [3 [3 4] [1 2]] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
687       "                                                                   [1 2] [3 4] 3 [[4] [1 2]] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
688       "                                                                           [1 2] [3 4] 3 [4] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
689       "                                                                           [1 2] [3 4] 3 [4] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
690       "                                                                     [1 2] [3 4] 3 [4] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
691       "                                                                     [1 2] [3 4] 3 [4] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
692       "                                                               [1 2] [3 4] 3 [4] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
693       "                                                               [1 2] [3 4] 3 [4] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
694       "                                                               [1 2] [3 4] 3 [4] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
695       "                                                                               [1 2] [3 4] 3 • [pop] dip [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
696       "                                                                         [1 2] [3 4] 3 [pop] • dip [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
697       "                                                                                 [1 2] [3 4] • pop 3 [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
698       "                                                                                       [1 2] • 3 [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
699       "                                                                                     [1 2] 3 • [4] [[] ccons] [_step0] [dupdipd] dip x i\n",
700       "                                                                                 [1 2] 3 [4] • [[] ccons] [_step0] [dupdipd] dip x i\n",
701       "                                                                      [1 2] 3 [4] [[] ccons] • [_step0] [dupdipd] dip x i\n",
702       "                                                             [1 2] 3 [4] [[] ccons] [_step0] • [dupdipd] dip x i\n",
703       "                                                   [1 2] 3 [4] [[] ccons] [_step0] [dupdipd] • dip x i\n",
704       "                                                                      [1 2] 3 [4] [[] ccons] • dupdipd [_step0] x i\n",
705       "                                                                      [1 2] 3 [4] [[] ccons] • dup dipd [_step0] x i\n",
706       "                                                           [1 2] 3 [4] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
707       "                                                           [1 2] 3 [4] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
708       "                                                     [1 2] 3 [4] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
709       "                                                     [1 2] 3 [4] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
710       "                                                     [1 2] 3 [4] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
711       "                                                                                 [1 2] 3 [4] • [[] ccons] dip [[] ccons] [_step0] x i\n",
712       "                                                                      [1 2] 3 [4] [[] ccons] • dip [[] ccons] [_step0] x i\n",
713       "                                                                                     [1 2] 3 • [] ccons [4] [[] ccons] [_step0] x i\n",
714       "                                                                                  [1 2] 3 [] • ccons [4] [[] ccons] [_step0] x i\n",
715       "                                                                                  [1 2] 3 [] • cons cons [4] [[] ccons] [_step0] x i\n",
716       "                                                                                   [1 2] [3] • cons [4] [[] ccons] [_step0] x i\n",
717       "                                                                                   [[1 2] 3] • [4] [[] ccons] [_step0] x i\n",
718       "                                                                               [[1 2] 3] [4] • [[] ccons] [_step0] x i\n",
719       "                                                                    [[1 2] 3] [4] [[] ccons] • [_step0] x i\n",
720       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • x i\n",
721       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • dup i i\n",
722       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [_step0] • i i\n",
723       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _step0 i\n",
724       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
725       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
726       "                                                       [[1 2] 3] [4] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
727       "                                                       [[1 2] 3] [4] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
728       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
729       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
730       "                                                 [[1 2] 3] [4] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
731       "                                                                    [[1 2] 3] [4] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
732       "                                                                [[1 2] 3] [4] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
733       "                                                                               [[1 2] 3] [4] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
734       "                                                                               [[1 2] 3] [4] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
735       "                                                                           [[1 2] 3] [4] [4] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
736       "                                                                          [[1 2] 3] [4] true • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
737       "                                                               [[1 2] 3] [4] true [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
738       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
739       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
740       "                                                      [[1 2] 3] [4] true [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
741       "                                               [[1 2] 3] [4] true [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
742       "                                                               [[1 2] 3] [4] true [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
743       "                                                               [[1 2] 3] [4] [[] ccons] true • [_step0] swap [popopop] [_stept] branch i\n",
744       "                                                      [[1 2] 3] [4] [[] ccons] true [_step0] • swap [popopop] [_stept] branch i\n",
745       "                                                      [[1 2] 3] [4] [[] ccons] [_step0] true • [popopop] [_stept] branch i\n",
746       "                                            [[1 2] 3] [4] [[] ccons] [_step0] true [popopop] • [_stept] branch i\n",
747       "                                   [[1 2] 3] [4] [[] ccons] [_step0] true [popopop] [_stept] • branch i\n",
748       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • _stept i\n",
749       "                                                           [[1 2] 3] [4] [[] ccons] [_step0] • [uncons] dipd [dupdipd] dip x i\n",
750       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [uncons] • dipd [dupdipd] dip x i\n",
751       "                                                  [[1 2] 3] [4] [[] ccons] [_step0] [uncons] • [dip] codi [dupdipd] dip x i\n",
752       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [uncons] [dip] • codi [dupdipd] dip x i\n",
753       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [uncons] [dip] • cons dip [dupdipd] dip x i\n",
754       "                                            [[1 2] 3] [4] [[] ccons] [_step0] [[uncons] dip] • dip [dupdipd] dip x i\n",
755       "                                                                    [[1 2] 3] [4] [[] ccons] • [uncons] dip [_step0] [dupdipd] dip x i\n",
756       "                                                           [[1 2] 3] [4] [[] ccons] [uncons] • dip [_step0] [dupdipd] dip x i\n",
757       "                                                                               [[1 2] 3] [4] • uncons [[] ccons] [_step0] [dupdipd] dip x i\n",
758       "                                                                               [[1 2] 3] [4] • [first] [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
759       "                                                                       [[1 2] 3] [4] [first] • [rest] cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
760       "                                                                [[1 2] 3] [4] [first] [rest] • cleave [[] ccons] [_step0] [dupdipd] dip x i\n",
761       "                                                                [[1 2] 3] [4] [first] [rest] • fork popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
762       "                                                                [[1 2] 3] [4] [first] [rest] • [i] app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
763       "                                                            [[1 2] 3] [4] [first] [rest] [i] • app2 popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
764       "                                                            [[1 2] 3] [4] [first] [rest] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
765       "                                      [[1 2] 3] [4] [first] [rest] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
766       "                                                                [[1 2] 3] [4] [first] [rest] • grba swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
767       "                                                                [[1 2] 3] [4] [first] [rest] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
768       "                                                   [[1 2] 3] [4] [first] [rest] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
769       "                                                                       [[1 2] 3] [4] [first] • stack popd [rest] swap grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
770       "                                               [[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",
771       "                                               [[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",
772       "                                         [[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",
773       "                                                                       [[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",
774       "                                                                               [[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",
775       "                                                       [[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",
776       "                                                [[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",
777       "                                                [[1 2] 3] [4] [rest] [[first] [4] [[1 2] 3]] • grba swap [i] [infrst] cons ii popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
778       "                                                [[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",
779       "                                   [[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",
780       "                                                                        [[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",
781       "                                                 [[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",
782       "                                                 [[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",
783       "                                           [[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",
784       "                                                                        [[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",
785       "                                                                               [[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",
786       "                                                        [[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",
787       "                                [[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",
788       "                                [[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",
789       "                            [[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",
790       "                   [[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",
791       "                   [[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",
792       "                   [[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",
793       "             [[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",
794       "             [[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",
795       "             [[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",
796       "       [[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",
797       "                   [[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",
798       "      [[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",
799       "[[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",
800       "                   [[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",
801       "                                                       [[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",
802       "                                                   [[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",
803       "                                                   [[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",
804       "                                                   [[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",
805       "                                                   [[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",
806       "                                                   [[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",
807       "                                                   [[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",
808       "                                                   [[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",
809       "                                               [[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",
810       "                                                                   [[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",
811       "                                                                       [[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",
812       "                                                                               [[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",
813       "                                                                                 [[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",
814       "                                                                 [[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",
815       "                                                                 [[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",
816       "                                                                             [[1 2] 3] [4] 4 • [[rest] [4] [[1 2] 3]] [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
817       "                                                      [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] • [[i] infrst] i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
818       "                                         [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [[i] infrst] • i popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
819       "                                                      [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] • [i] infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
820       "                                                  [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [i] • infrst popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
821       "                                                  [[1 2] 3] [4] 4 [[rest] [4] [[1 2] 3]] [i] • infra first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
822       "                                                  [[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",
823       "                                                  [[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",
824       "                                                  [[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",
825       "                                                  [[1 2] 3] [4] 4 [[i] [rest] [4] [[1 2] 3]] • swaack [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
826       "                                                  [[1 2] 3] [4] [rest] [i] [4 [4] [[1 2] 3]] • [i] dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
827       "                                              [[1 2] 3] [4] [rest] [i] [4 [4] [[1 2] 3]] [i] • dip swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
828       "                                                                    [[1 2] 3] [4] [rest] [i] • i [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
829       "                                                                        [[1 2] 3] [4] [rest] • i [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
830       "                                                                               [[1 2] 3] [4] • rest [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
831       "                                                                               [[1 2] 3] [4] • [pop] infra [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
832       "                                                                         [[1 2] 3] [4] [pop] • infra [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
833       "                                                                         [[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",
834       "                                                                         [[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",
835       "                                                                         [[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",
836       "                                                                         [[1 2] 3] [[pop] 4] • swaack [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
837       "                                                                         4 [pop] [[[1 2] 3]] • [i] dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
838       "                                                                     4 [pop] [[[1 2] 3]] [i] • dip swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
839       "                                                                                     4 [pop] • i [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
840       "                                                                                           4 • pop [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
841       "                                                                                             • [[[1 2] 3]] swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
842       "                                                                                 [[[1 2] 3]] • swaack [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
843       "                                                                                [[1 2] 3] [] • [4 [4] [[1 2] 3]] swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
844       "                                                              [[1 2] 3] [] [4 [4] [[1 2] 3]] • swaack first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
845       "                                                              [[1 2] 3] [4] 4 [[] [[1 2] 3]] • first popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
846       "                                                                          [[1 2] 3] [4] 4 [] • popdd [[] ccons] [_step0] [dupdipd] dip x i\n",
847       "                                                                          [[1 2] 3] [4] 4 [] • [pop] dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
848       "                                                                    [[1 2] 3] [4] 4 [] [pop] • dipd [[] ccons] [_step0] [dupdipd] dip x i\n",
849       "                                                                    [[1 2] 3] [4] 4 [] [pop] • [dip] codi [[] ccons] [_step0] [dupdipd] dip x i\n",
850       "                                                              [[1 2] 3] [4] 4 [] [pop] [dip] • codi [[] ccons] [_step0] [dupdipd] dip x i\n",
851       "                                                              [[1 2] 3] [4] 4 [] [pop] [dip] • cons dip [[] ccons] [_step0] [dupdipd] dip x i\n",
852       "                                                              [[1 2] 3] [4] 4 [] [[pop] dip] • dip [[] ccons] [_step0] [dupdipd] dip x i\n",
853       "                                                                             [[1 2] 3] [4] 4 • [pop] dip [] [[] ccons] [_step0] [dupdipd] dip x i\n",
854       "                                                                       [[1 2] 3] [4] 4 [pop] • dip [] [[] ccons] [_step0] [dupdipd] dip x i\n",
855       "                                                                               [[1 2] 3] [4] • pop 4 [] [[] ccons] [_step0] [dupdipd] dip x i\n",
856       "                                                                                   [[1 2] 3] • 4 [] [[] ccons] [_step0] [dupdipd] dip x i\n",
857       "                                                                                 [[1 2] 3] 4 • [] [[] ccons] [_step0] [dupdipd] dip x i\n",
858       "                                                                              [[1 2] 3] 4 [] • [[] ccons] [_step0] [dupdipd] dip x i\n",
859       "                                                                   [[1 2] 3] 4 [] [[] ccons] • [_step0] [dupdipd] dip x i\n",
860       "                                                          [[1 2] 3] 4 [] [[] ccons] [_step0] • [dupdipd] dip x i\n",
861       "                                                [[1 2] 3] 4 [] [[] ccons] [_step0] [dupdipd] • dip x i\n",
862       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dupdipd [_step0] x i\n",
863       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dup dipd [_step0] x i\n",
864       "                                                        [[1 2] 3] 4 [] [[] ccons] [[] ccons] • dipd [_step0] x i\n",
865       "                                                        [[1 2] 3] 4 [] [[] ccons] [[] ccons] • [dip] codi [_step0] x i\n",
866       "                                                  [[1 2] 3] 4 [] [[] ccons] [[] ccons] [dip] • codi [_step0] x i\n",
867       "                                                  [[1 2] 3] 4 [] [[] ccons] [[] ccons] [dip] • cons dip [_step0] x i\n",
868       "                                                  [[1 2] 3] 4 [] [[] ccons] [[[] ccons] dip] • dip [_step0] x i\n",
869       "                                                                              [[1 2] 3] 4 [] • [[] ccons] dip [[] ccons] [_step0] x i\n",
870       "                                                                   [[1 2] 3] 4 [] [[] ccons] • dip [[] ccons] [_step0] x i\n",
871       "                                                                                 [[1 2] 3] 4 • [] ccons [] [[] ccons] [_step0] x i\n",
872       "                                                                              [[1 2] 3] 4 [] • ccons [] [[] ccons] [_step0] x i\n",
873       "                                                                              [[1 2] 3] 4 [] • cons cons [] [[] ccons] [_step0] x i\n",
874       "                                                                               [[1 2] 3] [4] • cons [] [[] ccons] [_step0] x i\n",
875       "                                                                               [[[1 2] 3] 4] • [] [[] ccons] [_step0] x i\n",
876       "                                                                            [[[1 2] 3] 4] [] • [[] ccons] [_step0] x i\n",
877       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • [_step0] x i\n",
878       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • x i\n",
879       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • dup i i\n",
880       "                                               [[[1 2] 3] 4] [] [[] ccons] [_step0] [_step0] • i i\n",
881       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • _step0 i\n",
882       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • _step1 [popopop] [_stept] branch i\n",
883       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • [?] dipd roll< [popopop] [_stept] branch i\n",
884       "                                                    [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] • dipd roll< [popopop] [_stept] branch i\n",
885       "                                                    [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] • [dip] codi roll< [popopop] [_stept] branch i\n",
886       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] [dip] • codi roll< [popopop] [_stept] branch i\n",
887       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [?] [dip] • cons dip roll< [popopop] [_stept] branch i\n",
888       "                                              [[[1 2] 3] 4] [] [[] ccons] [_step0] [[?] dip] • dip roll< [popopop] [_stept] branch i\n",
889       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • [?] dip [_step0] roll< [popopop] [_stept] branch i\n",
890       "                                                             [[[1 2] 3] 4] [] [[] ccons] [?] • dip [_step0] roll< [popopop] [_stept] branch i\n",
891       "                                                                            [[[1 2] 3] 4] [] • ? [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
892       "                                                                            [[[1 2] 3] 4] [] • dup bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
893       "                                                                         [[[1 2] 3] 4] [] [] • bool [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
894       "                                                                      [[[1 2] 3] 4] [] false • [[] ccons] [_step0] roll< [popopop] [_stept] branch i\n",
895       "                                                           [[[1 2] 3] 4] [] false [[] ccons] • [_step0] roll< [popopop] [_stept] branch i\n",
896       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • roll< [popopop] [_stept] branch i\n",
897       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • swapd swap [popopop] [_stept] branch i\n",
898       "                                                  [[[1 2] 3] 4] [] false [[] ccons] [_step0] • [swap] dip swap [popopop] [_stept] branch i\n",
899       "                                           [[[1 2] 3] 4] [] false [[] ccons] [_step0] [swap] • dip swap [popopop] [_stept] branch i\n",
900       "                                                           [[[1 2] 3] 4] [] false [[] ccons] • swap [_step0] swap [popopop] [_stept] branch i\n",
901       "                                                           [[[1 2] 3] 4] [] [[] ccons] false • [_step0] swap [popopop] [_stept] branch i\n",
902       "                                                  [[[1 2] 3] 4] [] [[] ccons] false [_step0] • swap [popopop] [_stept] branch i\n",
903       "                                                  [[[1 2] 3] 4] [] [[] ccons] [_step0] false • [popopop] [_stept] branch i\n",
904       "                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] false [popopop] • [_stept] branch i\n",
905       "                               [[[1 2] 3] 4] [] [[] ccons] [_step0] false [popopop] [_stept] • branch i\n",
906       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • popopop i\n",
907       "                                                        [[[1 2] 3] 4] [] [[] ccons] [_step0] • pop popop i\n",
908       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • popop i\n",
909       "                                                                 [[[1 2] 3] 4] [] [[] ccons] • pop pop i\n",
910       "                                                                            [[[1 2] 3] 4] [] • pop i\n",
911       "                                                                               [[[1 2] 3] 4] • i\n",
912       "                                                                                             • [[1 2] 3] 4\n",
913       "                                                                                   [[1 2] 3] • 4\n",
914       "                                                                                 [[1 2] 3] 4 • \n",
915       "\n",
916       "[[1 2] 3] 4"
917      ]
918     }
919    ],
920    "source": [
921     "1 [2 3 4] [Z] trace"
922    ]
923   },
924   {
925    "cell_type": "code",
926    "execution_count": 19,
927    "metadata": {},
928    "outputs": [
929     {
930      "name": "stdout",
931      "output_type": "stream",
932      "text": []
933     }
934    ],
935    "source": [
936     "clear"
937    ]
938   },
939   {
940    "cell_type": "markdown",
941    "metadata": {},
942    "source": [
943     "And here it is doing the thing."
944    ]
945   },
946   {
947    "cell_type": "code",
948    "execution_count": 20,
949    "metadata": {},
950    "outputs": [
951     {
952      "name": "stdout",
953      "output_type": "stream",
954      "text": [
955       "[1 [2 [3 4 25 6] 7] 8] [sqr] [dip dip infra dip infra dip infra]"
956      ]
957     }
958    ],
959    "source": [
960     "[1 [2 [3 4 25 6] 7] 8] [sqr] [dip dip infra dip infra dip infra]"
961    ]
962   },
963   {
964    "cell_type": "code",
965    "execution_count": null,
966    "metadata": {},
967    "outputs": [],
968    "source": [
969     " [[[] ccons] step i] trace"
970    ]
971   },
972   {
973    "cell_type": "markdown",
974    "metadata": {},
975    "source": [
976     "## Addressing\n",
977     "Because we are only using two combinators we could replace the list with a string made from only two characters.\n",
978     "\n",
979     "       [...] [Q] 'ddididi' Zstr\n",
980     "    -------------------------------------------------------------\n",
981     "       [...] [[[[[[[Q] dip] dip] infra] dip] infra] dip] infra\n",
982     "\n",
983     "The string can be considered a name or address for an item in the subject datastructure.\n",
984     "\n",
985     "## Determining the right \"path\" for an item in a tree.\n",
986     "It's easy to read off (in reverse) the right sequence of \"d\" and \"i\" from the subject datastructure:\n",
987     "\n",
988     "    [ n [ n [ n n x ...\n",
989     "    i d i d i d d Bingo!"
990    ]
991   }
992  ],
993  "metadata": {
994   "kernelspec": {
995    "display_name": "Joypy",
996    "language": "",
997    "name": "thun"
998   },
999   "language_info": {
1000    "file_extension": ".joy",
1001    "mimetype": "text/plain",
1002    "name": "Joy"
1003   }
1004  },
1005  "nbformat": 4,
1006  "nbformat_minor": 2
1007 }