OSDN Git Service

I narrowed down the bug.
[joypy/Thun.git] / docs / Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.md
1 Cf. ["Bananas, Lenses, & Barbed Wire"](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.125)
2
3 # [Hylomorphism](https://en.wikipedia.org/wiki/Hylomorphism_%28computer_science%29)
4 A [hylomorphism](https://en.wikipedia.org/wiki/Hylomorphism_%28computer_science%29) `H :: A -> B` converts a value of type A into a value of type B by means of:
5
6 - A generator `G :: A -> (A, B)`
7 - A combiner `F :: (B, B) -> B`
8 - A predicate `P :: A -> Bool` to detect the base case
9 - A base case value `c :: B`
10 - Recursive calls (zero or more); it has a "call stack in the form of a cons list".
11
12 It may be helpful to see this function implemented in imperative Python code.
13
14
15 ```python
16 def hylomorphism(c, F, P, G):
17     '''Return a hylomorphism function H.'''
18
19     def H(a):
20         if P(a):
21             result = c
22         else:
23             b, aa = G(a)
24             result = F(b, H(aa))
25         return result
26
27     return H
28 ```
29
30 ### Finding [Triangular Numbers](https://en.wikipedia.org/wiki/Triangular_number)
31 As a concrete example let's use a function that, given a positive integer, returns the sum of all positive integers less than that one.  (In this case the types A and B are both `int`.)
32 ### With `range()` and `sum()`
33
34
35 ```python
36 r = range(10)
37 r
38 ```
39
40
41
42
43     [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
44
45
46
47
48 ```python
49 sum(r)
50 ```
51
52
53
54
55     45
56
57
58
59
60 ```python
61 range_sum = lambda n: sum(range(n))
62 range_sum(10)
63 ```
64
65
66
67
68     45
69
70
71
72 ### As a hylomorphism
73
74
75 ```python
76 G = lambda n: (n - 1, n - 1)
77 F = lambda a, b: a + b
78 P = lambda n: n <= 1
79
80 H = hylomorphism(0, F, P, G)
81 ```
82
83
84 ```python
85 H(10)
86 ```
87
88
89
90
91     45
92
93
94
95 If you were to run the above code in a debugger and check out the call stack you would find that the variable `b` in each call to `H()` is storing the intermediate values as `H()` recurses.  This is what was meant by "call stack in the form of a cons list".
96
97 ### Joy Preamble
98
99
100 ```python
101 from notebook_preamble import D, DefinitionWrapper, J, V, define
102 ```
103
104 ## Hylomorphism in Joy
105 We can define a combinator `hylomorphism` that will make a hylomorphism combinator `H` from constituent parts.
106
107     H == c [F] [P] [G] hylomorphism
108
109 The function `H` is recursive, so we start with `ifte` and set the else-part to
110 some function `J` that will contain a quoted copy of `H`.  (The then-part just
111 discards the leftover `a` and replaces it with the base case value `c`.)
112
113     H == [P] [pop c] [J] ifte
114
115 The else-part `J` gets just the argument `a` on the stack.
116
117     a J
118     a G              The first thing to do is use the generator G
119     aa b             which produces b and a new aa
120     aa b [H] dip     we recur with H on the new aa
121     aa H b F         and run F on the result.
122
123 This gives us a definition for `J`.
124
125     J == G [H] dip F
126
127 Plug it in and convert to genrec.
128
129     H == [P] [pop c] [G [H] dip F] ifte
130     H == [P] [pop c] [G]   [dip F] genrec
131
132 This is the form of a hylomorphism in Joy, which nicely illustrates that
133 it is a simple specialization of the general recursion combinator.
134
135     H == [P] [pop c] [G] [dip F] genrec
136
137 ## Derivation of `hylomorphism`
138
139 Now we just need to derive a definition that builds the `genrec` arguments
140 out of the pieces given to the `hylomorphism` combinator.
141
142     H == [P] [pop c]              [G]                  [dip F] genrec
143          [P] [c]    [pop] swoncat [G]        [F] [dip] swoncat genrec
144          [P] c unit [pop] swoncat [G]        [F] [dip] swoncat genrec
145          [P] c [G] [F] [unit [pop] swoncat] dipd [dip] swoncat genrec
146
147 Working in reverse:
148 - Use `swoncat` twice to decouple `[c]` and `[F]`.
149 - Use `unit` to dequote `c`.
150 - Use `dipd` to untangle `[unit [pop] swoncat]` from the givens.
151
152 At this point all of the arguments (givens) to the hylomorphism are to the left so we have
153 a definition for `hylomorphism`:
154
155     hylomorphism == [unit [pop] swoncat] dipd [dip] swoncat genrec
156
157 The order of parameters is different than the one we started with but
158 that hardly matters, you can rearrange them or just supply them in the
159 expected order.
160
161     [P] c [G] [F] hylomorphism == H
162
163
164
165
166 ```python
167 define('hylomorphism == [unit [pop] swoncat] dipd [dip] swoncat genrec')
168 ```
169
170 Demonstrate summing a range of integers from 0 to n-1.
171
172 - `[P]` is `[0 <=]`
173 - `c` is `0`
174 - `[G]` is `[1 - dup]`
175 - `[F]` is `[+]`
176
177 So to sum the positive integers less than five we can do this.
178
179
180 ```python
181 V('5 [0 <=] 0 [1 - dup] [+] hylomorphism')
182 ```
183
184                                                                                    . 5 [0 <=] 0 [1 - dup] [+] hylomorphism
185                                                                                  5 . [0 <=] 0 [1 - dup] [+] hylomorphism
186                                                                           5 [0 <=] . 0 [1 - dup] [+] hylomorphism
187                                                                         5 [0 <=] 0 . [1 - dup] [+] hylomorphism
188                                                               5 [0 <=] 0 [1 - dup] . [+] hylomorphism
189                                                           5 [0 <=] 0 [1 - dup] [+] . hylomorphism
190                                                           5 [0 <=] 0 [1 - dup] [+] . [unit [pop] swoncat] dipd [dip] swoncat genrec
191                                      5 [0 <=] 0 [1 - dup] [+] [unit [pop] swoncat] . dipd [dip] swoncat genrec
192                                                                         5 [0 <=] 0 . unit [pop] swoncat [1 - dup] [+] [dip] swoncat genrec
193                                                                         5 [0 <=] 0 . [] cons [pop] swoncat [1 - dup] [+] [dip] swoncat genrec
194                                                                      5 [0 <=] 0 [] . cons [pop] swoncat [1 - dup] [+] [dip] swoncat genrec
195                                                                       5 [0 <=] [0] . [pop] swoncat [1 - dup] [+] [dip] swoncat genrec
196                                                                 5 [0 <=] [0] [pop] . swoncat [1 - dup] [+] [dip] swoncat genrec
197                                                                 5 [0 <=] [0] [pop] . swap concat [1 - dup] [+] [dip] swoncat genrec
198                                                                 5 [0 <=] [pop] [0] . concat [1 - dup] [+] [dip] swoncat genrec
199                                                                   5 [0 <=] [pop 0] . [1 - dup] [+] [dip] swoncat genrec
200                                                         5 [0 <=] [pop 0] [1 - dup] . [+] [dip] swoncat genrec
201                                                     5 [0 <=] [pop 0] [1 - dup] [+] . [dip] swoncat genrec
202                                               5 [0 <=] [pop 0] [1 - dup] [+] [dip] . swoncat genrec
203                                               5 [0 <=] [pop 0] [1 - dup] [+] [dip] . swap concat genrec
204                                               5 [0 <=] [pop 0] [1 - dup] [dip] [+] . concat genrec
205                                                 5 [0 <=] [pop 0] [1 - dup] [dip +] . genrec
206         5 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte
207     5 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [5] [0 <=] . infra first choice i
208                                                                                  5 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 5] swaack first choice i
209                                                                                5 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 5] swaack first choice i
210                                                                              False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 5] swaack first choice i
211        False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 5] . swaack first choice i
212        5 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i
213          5 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i
214                        5 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i
215                                                                                  5 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +
216                                                                                5 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +
217                                                                                  4 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +
218                                                                                4 4 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +
219                                      4 4 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip +
220                                                                                  4 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 4 +
221                                                                           4 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 4 +
222                                                                   4 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 4 +
223                                                         4 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 4 +
224                                                 4 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 4 +
225         4 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 4 +
226     4 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [4] [0 <=] . infra first choice i 4 +
227                                                                                  4 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 4] swaack first choice i 4 +
228                                                                                4 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 4] swaack first choice i 4 +
229                                                                              False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 4] swaack first choice i 4 +
230        False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 4] . swaack first choice i 4 +
231        4 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 4 +
232          4 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 4 +
233                        4 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 4 +
234                                                                                  4 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 4 +
235                                                                                4 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 4 +
236                                                                                  3 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 4 +
237                                                                                3 3 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 4 +
238                                      3 3 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 4 +
239                                                                                  3 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 3 + 4 +
240                                                                           3 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 3 + 4 +
241                                                                   3 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 3 + 4 +
242                                                         3 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 3 + 4 +
243                                                 3 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 3 + 4 +
244         3 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 3 + 4 +
245     3 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [3] [0 <=] . infra first choice i 3 + 4 +
246                                                                                  3 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 3] swaack first choice i 3 + 4 +
247                                                                                3 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 3] swaack first choice i 3 + 4 +
248                                                                              False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 3] swaack first choice i 3 + 4 +
249        False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 3] . swaack first choice i 3 + 4 +
250        3 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 3 + 4 +
251          3 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 3 + 4 +
252                        3 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 3 + 4 +
253                                                                                  3 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 3 + 4 +
254                                                                                3 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 3 + 4 +
255                                                                                  2 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 3 + 4 +
256                                                                                2 2 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 3 + 4 +
257                                      2 2 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 3 + 4 +
258                                                                                  2 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 2 + 3 + 4 +
259                                                                           2 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 2 + 3 + 4 +
260                                                                   2 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 2 + 3 + 4 +
261                                                         2 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 2 + 3 + 4 +
262                                                 2 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 2 + 3 + 4 +
263         2 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 2 + 3 + 4 +
264     2 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [2] [0 <=] . infra first choice i 2 + 3 + 4 +
265                                                                                  2 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 2] swaack first choice i 2 + 3 + 4 +
266                                                                                2 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 2] swaack first choice i 2 + 3 + 4 +
267                                                                              False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 2] swaack first choice i 2 + 3 + 4 +
268        False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 2] . swaack first choice i 2 + 3 + 4 +
269        2 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 2 + 3 + 4 +
270          2 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 2 + 3 + 4 +
271                        2 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 2 + 3 + 4 +
272                                                                                  2 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 2 + 3 + 4 +
273                                                                                2 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 2 + 3 + 4 +
274                                                                                  1 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 2 + 3 + 4 +
275                                                                                1 1 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 2 + 3 + 4 +
276                                      1 1 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 2 + 3 + 4 +
277                                                                                  1 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 1 + 2 + 3 + 4 +
278                                                                           1 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 1 + 2 + 3 + 4 +
279                                                                   1 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 1 + 2 + 3 + 4 +
280                                                         1 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 1 + 2 + 3 + 4 +
281                                                 1 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 1 + 2 + 3 + 4 +
282         1 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 1 + 2 + 3 + 4 +
283     1 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [1] [0 <=] . infra first choice i 1 + 2 + 3 + 4 +
284                                                                                  1 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 1] swaack first choice i 1 + 2 + 3 + 4 +
285                                                                                1 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 1] swaack first choice i 1 + 2 + 3 + 4 +
286                                                                              False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 1] swaack first choice i 1 + 2 + 3 + 4 +
287        False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 1] . swaack first choice i 1 + 2 + 3 + 4 +
288        1 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 1 + 2 + 3 + 4 +
289          1 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 1 + 2 + 3 + 4 +
290                        1 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 1 + 2 + 3 + 4 +
291                                                                                  1 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 1 + 2 + 3 + 4 +
292                                                                                1 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 1 + 2 + 3 + 4 +
293                                                                                  0 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 1 + 2 + 3 + 4 +
294                                                                                0 0 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 1 + 2 + 3 + 4 +
295                                      0 0 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 1 + 2 + 3 + 4 +
296                                                                                  0 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 0 + 1 + 2 + 3 + 4 +
297                                                                           0 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 0 + 1 + 2 + 3 + 4 +
298                                                                   0 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 0 + 1 + 2 + 3 + 4 +
299                                                         0 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 0 + 1 + 2 + 3 + 4 +
300                                                 0 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 0 + 1 + 2 + 3 + 4 +
301         0 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 0 + 1 + 2 + 3 + 4 +
302     0 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [0] [0 <=] . infra first choice i 0 + 1 + 2 + 3 + 4 +
303                                                                                  0 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 0] swaack first choice i 0 + 1 + 2 + 3 + 4 +
304                                                                                0 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 0] swaack first choice i 0 + 1 + 2 + 3 + 4 +
305                                                                               True . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 0] swaack first choice i 0 + 1 + 2 + 3 + 4 +
306         True [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 0] . swaack first choice i 0 + 1 + 2 + 3 + 4 +
307         0 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [True] . first choice i 0 + 1 + 2 + 3 + 4 +
308           0 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] True . choice i 0 + 1 + 2 + 3 + 4 +
309                                                                          0 [pop 0] . i 0 + 1 + 2 + 3 + 4 +
310                                                                                  0 . pop 0 0 + 1 + 2 + 3 + 4 +
311                                                                                    . 0 0 + 1 + 2 + 3 + 4 +
312                                                                                  0 . 0 + 1 + 2 + 3 + 4 +
313                                                                                0 0 . + 1 + 2 + 3 + 4 +
314                                                                                  0 . 1 + 2 + 3 + 4 +
315                                                                                0 1 . + 2 + 3 + 4 +
316                                                                                  1 . 2 + 3 + 4 +
317                                                                                1 2 . + 3 + 4 +
318                                                                                  3 . 3 + 4 +
319                                                                                3 3 . + 4 +
320                                                                                  6 . 4 +
321                                                                                6 4 . +
322                                                                                 10 . 
323
324
325 # Anamorphism
326 An anamorphism can be defined as a hylomorphism that uses `[]` for `c` and
327 `swons` for `F`.
328
329     [P] [G] anamorphism == [P] [] [G] [swons] hylomorphism == A
330
331 This allows us to define an anamorphism combinator in terms of
332 the hylomorphism combinator.
333
334     [] swap [swons] hylomorphism == anamorphism
335
336 Partial evaluation gives us a "pre-cooked" form.
337
338     [P] [G] . anamorphism
339     [P] [G] . [] swap [swons] hylomorphism
340     [P] [G] [] . swap [swons] hylomorphism
341     [P] [] [G] . [swons] hylomorphism
342     [P] [] [G] [swons] . hylomorphism
343     [P] [] [G] [swons] . [unit [pop] swoncat] dipd [dip] swoncat genrec
344     [P] [] [G] [swons] [unit [pop] swoncat] . dipd [dip] swoncat genrec
345     [P] [] . unit [pop] swoncat [G] [swons] [dip] swoncat genrec
346     [P] [[]] [pop] . swoncat [G] [swons] [dip] swoncat genrec
347     [P] [pop []] [G] [swons] [dip] . swoncat genrec
348
349     [P] [pop []] [G] [dip swons] genrec
350
351 (We could also have just substituted for `c` and `F` in the definition of `H`.)
352
353     H == [P] [pop c ] [G] [dip F    ] genrec
354     A == [P] [pop []] [G] [dip swons] genrec
355
356 The partial evaluation is overkill in this case but it serves as a
357 reminder that this sort of program specialization can, in many cases, be
358 carried out automatically.)
359
360 Untangle `[G]` from `[pop []]` using `swap`.
361
362     [P] [G] [pop []] swap [dip swons] genrec
363
364 All of the arguments to `anamorphism` are to the left, so we have a definition for it.
365
366     anamorphism == [pop []] swap [dip swons] genrec
367
368 An example of an anamorphism is the range function.
369
370     range == [0 <=] [1 - dup] anamorphism
371
372
373 # Catamorphism
374 A catamorphism can be defined as a hylomorphism that uses `[uncons swap]` for `[G]`
375 and `[[] =]` for the predicate `[P]`.
376
377     c [F] catamorphism == [[] =] c [uncons swap] [F] hylomorphism == C
378
379 This allows us to define a `catamorphism` combinator in terms of
380 the `hylomorphism` combinator.
381
382     [[] =] roll> [uncons swap] swap hylomorphism == catamorphism
383  
384 Partial evaluation doesn't help much.
385
386     c [F] . catamorphism
387     c [F] . [[] =] roll> [uncons swap] swap hylomorphism
388     c [F] [[] =] . roll> [uncons swap] swap hylomorphism
389     [[] =] c [F] [uncons swap] . swap hylomorphism
390     [[] =] c [uncons swap] [F] . hylomorphism
391     [[] =] c [uncons swap] [F] [unit [pop] swoncat] . dipd [dip] swoncat genrec
392     [[] =] c . unit [pop] swoncat [uncons swap] [F] [dip] swoncat genrec
393     [[] =] [c] [pop] . swoncat [uncons swap] [F] [dip] swoncat genrec
394     [[] =] [pop c] [uncons swap] [F] [dip] . swoncat genrec
395     [[] =] [pop c] [uncons swap] [dip F] genrec
396
397 Because the arguments to catamorphism have to be prepared (unlike the arguments
398 to anamorphism, which only need to be rearranged slightly) there isn't much point
399 to "pre-cooking" the definition.
400
401     catamorphism == [[] =] roll> [uncons swap] swap hylomorphism
402
403 An example of a catamorphism is the sum function.
404
405     sum == 0 [+] catamorphism
406
407 ### "Fusion Law" for catas (UNFINISHED!!!)
408
409 I'm not sure exactly how to translate the "Fusion Law" for catamorphisms into Joy.
410
411 I know that a `map` composed with a cata can be expressed as a new cata:
412
413     [F] map b [B] cata == b [F B] cata
414
415 But this isn't the one described in "Bananas...".  That's more like:
416
417 A cata composed with some function can be expressed as some other cata:
418
419     b [B] catamorphism F == c [C] catamorphism
420
421 Given:
422
423     b F == c
424
425     ...
426
427     B F == [F] dip C
428
429     ...
430
431     b[B]cata F == c[C]cata
432
433     F(B(head, tail)) == C(head, F(tail))
434
435     1 [2 3] B F         1 [2 3] F C
436
437
438     b F == c
439     B F == F C
440
441     b [B] catamorphism F == c [C] catamorphism
442     b [B] catamorphism F == b F [C] catamorphism
443
444     ...
445
446 Or maybe,
447
448     [F] map b [B] cata == c [C] cata     ???
449
450     [F] map b [B] cata == b [F B] cata    I think this is generally true, unless F consumes stack items
451                                             instead of just transforming TOS.  Of course, there's always [F] unary.
452     b [F] unary [[F] unary B] cata
453
454     [10 *] map 0 swap [+] step == 0 swap [10 * +] step
455
456
457 For example:
458
459     F == 10 *
460     b == 0
461     B == +
462     c == 0
463     C == F +
464     
465     b F    == c
466     0 10 * == 0
467
468     B F    == [F]    dip C
469     + 10 * == [10 *] dip F +
470     + 10 * == [10 *] dip 10 * +
471
472     n m + 10 * == 10(n+m)
473
474     n m [10 *] dip 10 * +
475     n 10 * m 10 * +
476     10n m 10 * +
477     10n 10m +
478     10n+10m
479
480     10n+10m = 10(n+m)
481
482 Ergo:
483
484     0 [+] catamorphism 10 * == 0 [10 * +] catamorphism
485
486 ## The `step` combinator will usually be better to use than `catamorphism`.
487
488     sum == 0 swap [+] step
489     sum == 0 [+] catamorphism
490
491 # anamorphism catamorphism == hylomorphism
492 Here is (part of) the payoff.
493
494 An anamorphism followed by (composed with) a
495 catamorphism is a hylomorphism, with the advantage that the hylomorphism 
496 does not create the intermediate list structure.  The values are stored in
497 either the call stack, for those implementations that use one, or in the pending
498 expression ("continuation") for the Joypy interpreter.  They still have to 
499 be somewhere, converting from an anamorphism and catamorphism to a hylomorphism
500 just prevents using additional storage and doing additional processing.
501
502         range == [0 <=] [1 - dup] anamorphism
503           sum == 0 [+] catamorphism
504
505     range sum == [0 <=] [1 - dup] anamorphism 0 [+] catamorphism
506               == [0 <=] 0 [1 - dup] [+] hylomorphism
507
508 We can let the `hylomorphism` combinator build `range_sum` for us or just
509 substitute ourselves.
510
511             H == [P]    [pop c] [G]       [dip F] genrec
512     range_sum == [0 <=] [pop 0] [1 - dup] [dip +] genrec
513
514
515
516 ```python
517 defs = '''
518 anamorphism == [pop []] swap [dip swons] genrec
519 hylomorphism == [unit [pop] swoncat] dipd [dip] swoncat genrec
520 catamorphism == [[] =] roll> [uncons swap] swap hylomorphism
521 range == [0 <=] [1 - dup] anamorphism
522 sum == 0 [+] catamorphism
523 range_sum == [0 <=] 0 [1 - dup] [+] hylomorphism
524 '''
525
526 DefinitionWrapper.add_definitions(defs, D)
527 ```
528
529
530 ```python
531 J('10 range')
532 ```
533
534     [9 8 7 6 5 4 3 2 1 0]
535
536
537
538 ```python
539 J('[9 8 7 6 5 4 3 2 1 0] sum')
540 ```
541
542     45
543
544
545
546 ```python
547 V('10 range sum')
548 ```
549
550                                                                                                                                    . 10 range sum
551                                                                                                                                 10 . range sum
552                                                                                                                                 10 . [0 <=] [1 - dup] anamorphism sum
553                                                                                                                          10 [0 <=] . [1 - dup] anamorphism sum
554                                                                                                                10 [0 <=] [1 - dup] . anamorphism sum
555                                                                                                                10 [0 <=] [1 - dup] . [pop []] swap [dip swons] genrec sum
556                                                                                                       10 [0 <=] [1 - dup] [pop []] . swap [dip swons] genrec sum
557                                                                                                       10 [0 <=] [pop []] [1 - dup] . [dip swons] genrec sum
558                                                                                           10 [0 <=] [pop []] [1 - dup] [dip swons] . genrec sum
559                                              10 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte sum
560                                         10 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [10] [0 <=] . infra first choice i sum
561                                                                                                                                 10 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 10] swaack first choice i sum
562                                                                                                                               10 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 10] swaack first choice i sum
563                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 10] swaack first choice i sum
564                                             False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 10] . swaack first choice i sum
565                                             10 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i sum
566                                               10 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i sum
567                                                              10 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i sum
568                                                                                                                                 10 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons sum
569                                                                                                                               10 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons sum
570                                                                                                                                  9 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons sum
571                                                                                                                                9 9 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons sum
572                                                                                 9 9 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons sum
573                                                                                                                                  9 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 9 swons sum
574                                                                                                                           9 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 9 swons sum
575                                                                                                                  9 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 9 swons sum
576                                                                                                        9 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 9 swons sum
577                                                                                            9 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 9 swons sum
578                                               9 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 9 swons sum
579                                           9 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [9] [0 <=] . infra first choice i 9 swons sum
580                                                                                                                                  9 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 9] swaack first choice i 9 swons sum
581                                                                                                                                9 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 9] swaack first choice i 9 swons sum
582                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 9] swaack first choice i 9 swons sum
583                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 9] . swaack first choice i 9 swons sum
584                                              9 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 9 swons sum
585                                                9 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 9 swons sum
586                                                               9 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 9 swons sum
587                                                                                                                                  9 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 9 swons sum
588                                                                                                                                9 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 9 swons sum
589                                                                                                                                  8 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 9 swons sum
590                                                                                                                                8 8 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 9 swons sum
591                                                                                 8 8 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 9 swons sum
592                                                                                                                                  8 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 8 swons 9 swons sum
593                                                                                                                           8 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 8 swons 9 swons sum
594                                                                                                                  8 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 8 swons 9 swons sum
595                                                                                                        8 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 8 swons 9 swons sum
596                                                                                            8 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 8 swons 9 swons sum
597                                               8 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 8 swons 9 swons sum
598                                           8 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [8] [0 <=] . infra first choice i 8 swons 9 swons sum
599                                                                                                                                  8 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 8] swaack first choice i 8 swons 9 swons sum
600                                                                                                                                8 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 8] swaack first choice i 8 swons 9 swons sum
601                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 8] swaack first choice i 8 swons 9 swons sum
602                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 8] . swaack first choice i 8 swons 9 swons sum
603                                              8 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 8 swons 9 swons sum
604                                                8 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 8 swons 9 swons sum
605                                                               8 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 8 swons 9 swons sum
606                                                                                                                                  8 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 8 swons 9 swons sum
607                                                                                                                                8 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 8 swons 9 swons sum
608                                                                                                                                  7 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 8 swons 9 swons sum
609                                                                                                                                7 7 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 8 swons 9 swons sum
610                                                                                 7 7 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 8 swons 9 swons sum
611                                                                                                                                  7 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 7 swons 8 swons 9 swons sum
612                                                                                                                           7 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 7 swons 8 swons 9 swons sum
613                                                                                                                  7 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 7 swons 8 swons 9 swons sum
614                                                                                                        7 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 7 swons 8 swons 9 swons sum
615                                                                                            7 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 7 swons 8 swons 9 swons sum
616                                               7 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 7 swons 8 swons 9 swons sum
617                                           7 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [7] [0 <=] . infra first choice i 7 swons 8 swons 9 swons sum
618                                                                                                                                  7 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 7] swaack first choice i 7 swons 8 swons 9 swons sum
619                                                                                                                                7 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 7] swaack first choice i 7 swons 8 swons 9 swons sum
620                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 7] swaack first choice i 7 swons 8 swons 9 swons sum
621                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 7] . swaack first choice i 7 swons 8 swons 9 swons sum
622                                              7 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 7 swons 8 swons 9 swons sum
623                                                7 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 7 swons 8 swons 9 swons sum
624                                                               7 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 7 swons 8 swons 9 swons sum
625                                                                                                                                  7 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 7 swons 8 swons 9 swons sum
626                                                                                                                                7 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 7 swons 8 swons 9 swons sum
627                                                                                                                                  6 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 7 swons 8 swons 9 swons sum
628                                                                                                                                6 6 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 7 swons 8 swons 9 swons sum
629                                                                                 6 6 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 7 swons 8 swons 9 swons sum
630                                                                                                                                  6 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 6 swons 7 swons 8 swons 9 swons sum
631                                                                                                                           6 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 6 swons 7 swons 8 swons 9 swons sum
632                                                                                                                  6 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 6 swons 7 swons 8 swons 9 swons sum
633                                                                                                        6 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 6 swons 7 swons 8 swons 9 swons sum
634                                                                                            6 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 6 swons 7 swons 8 swons 9 swons sum
635                                               6 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 6 swons 7 swons 8 swons 9 swons sum
636                                           6 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [6] [0 <=] . infra first choice i 6 swons 7 swons 8 swons 9 swons sum
637                                                                                                                                  6 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 6] swaack first choice i 6 swons 7 swons 8 swons 9 swons sum
638                                                                                                                                6 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 6] swaack first choice i 6 swons 7 swons 8 swons 9 swons sum
639                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 6] swaack first choice i 6 swons 7 swons 8 swons 9 swons sum
640                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 6] . swaack first choice i 6 swons 7 swons 8 swons 9 swons sum
641                                              6 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 6 swons 7 swons 8 swons 9 swons sum
642                                                6 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 6 swons 7 swons 8 swons 9 swons sum
643                                                               6 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 6 swons 7 swons 8 swons 9 swons sum
644                                                                                                                                  6 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 6 swons 7 swons 8 swons 9 swons sum
645                                                                                                                                6 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 6 swons 7 swons 8 swons 9 swons sum
646                                                                                                                                  5 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 6 swons 7 swons 8 swons 9 swons sum
647                                                                                                                                5 5 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 6 swons 7 swons 8 swons 9 swons sum
648                                                                                 5 5 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 6 swons 7 swons 8 swons 9 swons sum
649                                                                                                                                  5 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 5 swons 6 swons 7 swons 8 swons 9 swons sum
650                                                                                                                           5 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 5 swons 6 swons 7 swons 8 swons 9 swons sum
651                                                                                                                  5 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 5 swons 6 swons 7 swons 8 swons 9 swons sum
652                                                                                                        5 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 5 swons 6 swons 7 swons 8 swons 9 swons sum
653                                                                                            5 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 5 swons 6 swons 7 swons 8 swons 9 swons sum
654                                               5 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 5 swons 6 swons 7 swons 8 swons 9 swons sum
655                                           5 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [5] [0 <=] . infra first choice i 5 swons 6 swons 7 swons 8 swons 9 swons sum
656                                                                                                                                  5 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 5] swaack first choice i 5 swons 6 swons 7 swons 8 swons 9 swons sum
657                                                                                                                                5 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 5] swaack first choice i 5 swons 6 swons 7 swons 8 swons 9 swons sum
658                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 5] swaack first choice i 5 swons 6 swons 7 swons 8 swons 9 swons sum
659                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 5] . swaack first choice i 5 swons 6 swons 7 swons 8 swons 9 swons sum
660                                              5 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 5 swons 6 swons 7 swons 8 swons 9 swons sum
661                                                5 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 5 swons 6 swons 7 swons 8 swons 9 swons sum
662                                                               5 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 5 swons 6 swons 7 swons 8 swons 9 swons sum
663                                                                                                                                  5 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
664                                                                                                                                5 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
665                                                                                                                                  4 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
666                                                                                                                                4 4 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
667                                                                                 4 4 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
668                                                                                                                                  4 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
669                                                                                                                           4 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
670                                                                                                                  4 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
671                                                                                                        4 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
672                                                                                            4 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
673                                               4 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
674                                           4 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [4] [0 <=] . infra first choice i 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
675                                                                                                                                  4 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 4] swaack first choice i 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
676                                                                                                                                4 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 4] swaack first choice i 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
677                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 4] swaack first choice i 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
678                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 4] . swaack first choice i 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
679                                              4 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
680                                                4 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
681                                                               4 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
682                                                                                                                                  4 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
683                                                                                                                                4 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
684                                                                                                                                  3 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
685                                                                                                                                3 3 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
686                                                                                 3 3 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
687                                                                                                                                  3 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
688                                                                                                                           3 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
689                                                                                                                  3 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
690                                                                                                        3 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
691                                                                                            3 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
692                                               3 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
693                                           3 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [3] [0 <=] . infra first choice i 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
694                                                                                                                                  3 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 3] swaack first choice i 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
695                                                                                                                                3 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 3] swaack first choice i 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
696                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 3] swaack first choice i 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
697                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 3] . swaack first choice i 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
698                                              3 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
699                                                3 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
700                                                               3 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
701                                                                                                                                  3 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
702                                                                                                                                3 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
703                                                                                                                                  2 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
704                                                                                                                                2 2 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
705                                                                                 2 2 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
706                                                                                                                                  2 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
707                                                                                                                           2 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
708                                                                                                                  2 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
709                                                                                                        2 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
710                                                                                            2 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
711                                               2 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
712                                           2 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [2] [0 <=] . infra first choice i 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
713                                                                                                                                  2 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 2] swaack first choice i 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
714                                                                                                                                2 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 2] swaack first choice i 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
715                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 2] swaack first choice i 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
716                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 2] . swaack first choice i 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
717                                              2 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
718                                                2 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
719                                                               2 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
720                                                                                                                                  2 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
721                                                                                                                                2 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
722                                                                                                                                  1 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
723                                                                                                                                1 1 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
724                                                                                 1 1 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
725                                                                                                                                  1 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
726                                                                                                                           1 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
727                                                                                                                  1 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
728                                                                                                        1 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
729                                                                                            1 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
730                                               1 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
731                                           1 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [1] [0 <=] . infra first choice i 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
732                                                                                                                                  1 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 1] swaack first choice i 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
733                                                                                                                                1 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 1] swaack first choice i 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
734                                                                                                                              False . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 1] swaack first choice i 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
735                                              False [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 1] . swaack first choice i 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
736                                              1 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
737                                                1 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] False . choice i 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
738                                                               1 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . i 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
739                                                                                                                                  1 . 1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
740                                                                                                                                1 1 . - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
741                                                                                                                                  0 . dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
742                                                                                                                                0 0 . [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
743                                                                                 0 0 [[0 <=] [pop []] [1 - dup] [dip swons] genrec] . dip swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
744                                                                                                                                  0 . [0 <=] [pop []] [1 - dup] [dip swons] genrec 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
745                                                                                                                           0 [0 <=] . [pop []] [1 - dup] [dip swons] genrec 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
746                                                                                                                  0 [0 <=] [pop []] . [1 - dup] [dip swons] genrec 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
747                                                                                                        0 [0 <=] [pop []] [1 - dup] . [dip swons] genrec 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
748                                                                                            0 [0 <=] [pop []] [1 - dup] [dip swons] . genrec 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
749                                               0 [0 <=] [pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] . ifte 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
750                                           0 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [0] [0 <=] . infra first choice i 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
751                                                                                                                                  0 . 0 <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 0] swaack first choice i 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
752                                                                                                                                0 0 . <= [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 0] swaack first choice i 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
753                                                                                                                               True . [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 0] swaack first choice i 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
754                                               True [[pop []] [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] 0] . swaack first choice i 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
755                                               0 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] [True] . first choice i 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
756                                                 0 [1 - dup [[0 <=] [pop []] [1 - dup] [dip swons] genrec] dip swons] [pop []] True . choice i 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
757                                                                                                                         0 [pop []] . i 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
758                                                                                                                                  0 . pop [] 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
759                                                                                                                                    . [] 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
760                                                                                                                                 [] . 0 swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
761                                                                                                                               [] 0 . swons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
762                                                                                                                               [] 0 . swap cons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
763                                                                                                                               0 [] . cons 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
764                                                                                                                                [0] . 1 swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
765                                                                                                                              [0] 1 . swons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
766                                                                                                                              [0] 1 . swap cons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
767                                                                                                                              1 [0] . cons 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
768                                                                                                                              [1 0] . 2 swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
769                                                                                                                            [1 0] 2 . swons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
770                                                                                                                            [1 0] 2 . swap cons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
771                                                                                                                            2 [1 0] . cons 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
772                                                                                                                            [2 1 0] . 3 swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
773                                                                                                                          [2 1 0] 3 . swons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
774                                                                                                                          [2 1 0] 3 . swap cons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
775                                                                                                                          3 [2 1 0] . cons 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
776                                                                                                                          [3 2 1 0] . 4 swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
777                                                                                                                        [3 2 1 0] 4 . swons 5 swons 6 swons 7 swons 8 swons 9 swons sum
778                                                                                                                        [3 2 1 0] 4 . swap cons 5 swons 6 swons 7 swons 8 swons 9 swons sum
779                                                                                                                        4 [3 2 1 0] . cons 5 swons 6 swons 7 swons 8 swons 9 swons sum
780                                                                                                                        [4 3 2 1 0] . 5 swons 6 swons 7 swons 8 swons 9 swons sum
781                                                                                                                      [4 3 2 1 0] 5 . swons 6 swons 7 swons 8 swons 9 swons sum
782                                                                                                                      [4 3 2 1 0] 5 . swap cons 6 swons 7 swons 8 swons 9 swons sum
783                                                                                                                      5 [4 3 2 1 0] . cons 6 swons 7 swons 8 swons 9 swons sum
784                                                                                                                      [5 4 3 2 1 0] . 6 swons 7 swons 8 swons 9 swons sum
785                                                                                                                    [5 4 3 2 1 0] 6 . swons 7 swons 8 swons 9 swons sum
786                                                                                                                    [5 4 3 2 1 0] 6 . swap cons 7 swons 8 swons 9 swons sum
787                                                                                                                    6 [5 4 3 2 1 0] . cons 7 swons 8 swons 9 swons sum
788                                                                                                                    [6 5 4 3 2 1 0] . 7 swons 8 swons 9 swons sum
789                                                                                                                  [6 5 4 3 2 1 0] 7 . swons 8 swons 9 swons sum
790                                                                                                                  [6 5 4 3 2 1 0] 7 . swap cons 8 swons 9 swons sum
791                                                                                                                  7 [6 5 4 3 2 1 0] . cons 8 swons 9 swons sum
792                                                                                                                  [7 6 5 4 3 2 1 0] . 8 swons 9 swons sum
793                                                                                                                [7 6 5 4 3 2 1 0] 8 . swons 9 swons sum
794                                                                                                                [7 6 5 4 3 2 1 0] 8 . swap cons 9 swons sum
795                                                                                                                8 [7 6 5 4 3 2 1 0] . cons 9 swons sum
796                                                                                                                [8 7 6 5 4 3 2 1 0] . 9 swons sum
797                                                                                                              [8 7 6 5 4 3 2 1 0] 9 . swons sum
798                                                                                                              [8 7 6 5 4 3 2 1 0] 9 . swap cons sum
799                                                                                                              9 [8 7 6 5 4 3 2 1 0] . cons sum
800                                                                                                              [9 8 7 6 5 4 3 2 1 0] . sum
801                                                                                                              [9 8 7 6 5 4 3 2 1 0] . 0 [+] catamorphism
802                                                                                                            [9 8 7 6 5 4 3 2 1 0] 0 . [+] catamorphism
803                                                                                                        [9 8 7 6 5 4 3 2 1 0] 0 [+] . catamorphism
804                                                                                                        [9 8 7 6 5 4 3 2 1 0] 0 [+] . [[] =] roll> [uncons swap] swap hylomorphism
805                                                                                                 [9 8 7 6 5 4 3 2 1 0] 0 [+] [[] =] . roll> [uncons swap] swap hylomorphism
806                                                                                                 [9 8 7 6 5 4 3 2 1 0] [[] =] 0 [+] . [uncons swap] swap hylomorphism
807                                                                                   [9 8 7 6 5 4 3 2 1 0] [[] =] 0 [+] [uncons swap] . swap hylomorphism
808                                                                                   [9 8 7 6 5 4 3 2 1 0] [[] =] 0 [uncons swap] [+] . hylomorphism
809                                                                                   [9 8 7 6 5 4 3 2 1 0] [[] =] 0 [uncons swap] [+] . [unit [pop] swoncat] dipd [dip] swoncat genrec
810                                                              [9 8 7 6 5 4 3 2 1 0] [[] =] 0 [uncons swap] [+] [unit [pop] swoncat] . dipd [dip] swoncat genrec
811                                                                                                     [9 8 7 6 5 4 3 2 1 0] [[] =] 0 . unit [pop] swoncat [uncons swap] [+] [dip] swoncat genrec
812                                                                                                     [9 8 7 6 5 4 3 2 1 0] [[] =] 0 . [] cons [pop] swoncat [uncons swap] [+] [dip] swoncat genrec
813                                                                                                  [9 8 7 6 5 4 3 2 1 0] [[] =] 0 [] . cons [pop] swoncat [uncons swap] [+] [dip] swoncat genrec
814                                                                                                   [9 8 7 6 5 4 3 2 1 0] [[] =] [0] . [pop] swoncat [uncons swap] [+] [dip] swoncat genrec
815                                                                                             [9 8 7 6 5 4 3 2 1 0] [[] =] [0] [pop] . swoncat [uncons swap] [+] [dip] swoncat genrec
816                                                                                             [9 8 7 6 5 4 3 2 1 0] [[] =] [0] [pop] . swap concat [uncons swap] [+] [dip] swoncat genrec
817                                                                                             [9 8 7 6 5 4 3 2 1 0] [[] =] [pop] [0] . concat [uncons swap] [+] [dip] swoncat genrec
818                                                                                               [9 8 7 6 5 4 3 2 1 0] [[] =] [pop 0] . [uncons swap] [+] [dip] swoncat genrec
819                                                                                 [9 8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] . [+] [dip] swoncat genrec
820                                                                             [9 8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [+] . [dip] swoncat genrec
821                                                                       [9 8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [+] [dip] . swoncat genrec
822                                                                       [9 8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [+] [dip] . swap concat genrec
823                                                                       [9 8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [dip] [+] . concat genrec
824                                                                         [9 8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec
825                             [9 8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte
826     [9 8 7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[9 8 7 6 5 4 3 2 1 0]] [[] =] . infra first choice i
827                                                                                                              [9 8 7 6 5 4 3 2 1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [9 8 7 6 5 4 3 2 1 0]] swaack first choice i
828                                                                                                           [9 8 7 6 5 4 3 2 1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [9 8 7 6 5 4 3 2 1 0]] swaack first choice i
829                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [9 8 7 6 5 4 3 2 1 0]] swaack first choice i
830                            False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [9 8 7 6 5 4 3 2 1 0]] . swaack first choice i
831                            [9 8 7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i
832                              [9 8 7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i
833                                            [9 8 7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i
834                                                                                                              [9 8 7 6 5 4 3 2 1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +
835                                                                                                              9 [8 7 6 5 4 3 2 1 0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +
836                                                                                                              [8 7 6 5 4 3 2 1 0] 9 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +
837                                                                [8 7 6 5 4 3 2 1 0] 9 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip +
838                                                                                                                [8 7 6 5 4 3 2 1 0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 9 +
839                                                                                                         [8 7 6 5 4 3 2 1 0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 9 +
840                                                                                                 [8 7 6 5 4 3 2 1 0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 9 +
841                                                                                   [8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 9 +
842                                                                           [8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 9 +
843                               [8 7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 9 +
844         [8 7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[8 7 6 5 4 3 2 1 0]] [[] =] . infra first choice i 9 +
845                                                                                                                [8 7 6 5 4 3 2 1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [8 7 6 5 4 3 2 1 0]] swaack first choice i 9 +
846                                                                                                             [8 7 6 5 4 3 2 1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [8 7 6 5 4 3 2 1 0]] swaack first choice i 9 +
847                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [8 7 6 5 4 3 2 1 0]] swaack first choice i 9 +
848                              False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [8 7 6 5 4 3 2 1 0]] . swaack first choice i 9 +
849                              [8 7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 9 +
850                                [8 7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 9 +
851                                              [8 7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 9 +
852                                                                                                                [8 7 6 5 4 3 2 1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 9 +
853                                                                                                                8 [7 6 5 4 3 2 1 0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 9 +
854                                                                                                                [7 6 5 4 3 2 1 0] 8 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 9 +
855                                                                  [7 6 5 4 3 2 1 0] 8 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 9 +
856                                                                                                                  [7 6 5 4 3 2 1 0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 8 + 9 +
857                                                                                                           [7 6 5 4 3 2 1 0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 8 + 9 +
858                                                                                                   [7 6 5 4 3 2 1 0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 8 + 9 +
859                                                                                     [7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 8 + 9 +
860                                                                             [7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 8 + 9 +
861                                 [7 6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 8 + 9 +
862             [7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[7 6 5 4 3 2 1 0]] [[] =] . infra first choice i 8 + 9 +
863                                                                                                                  [7 6 5 4 3 2 1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [7 6 5 4 3 2 1 0]] swaack first choice i 8 + 9 +
864                                                                                                               [7 6 5 4 3 2 1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [7 6 5 4 3 2 1 0]] swaack first choice i 8 + 9 +
865                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [7 6 5 4 3 2 1 0]] swaack first choice i 8 + 9 +
866                                False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [7 6 5 4 3 2 1 0]] . swaack first choice i 8 + 9 +
867                                [7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 8 + 9 +
868                                  [7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 8 + 9 +
869                                                [7 6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 8 + 9 +
870                                                                                                                  [7 6 5 4 3 2 1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 8 + 9 +
871                                                                                                                  7 [6 5 4 3 2 1 0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 8 + 9 +
872                                                                                                                  [6 5 4 3 2 1 0] 7 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 8 + 9 +
873                                                                    [6 5 4 3 2 1 0] 7 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 8 + 9 +
874                                                                                                                    [6 5 4 3 2 1 0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 7 + 8 + 9 +
875                                                                                                             [6 5 4 3 2 1 0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 7 + 8 + 9 +
876                                                                                                     [6 5 4 3 2 1 0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 7 + 8 + 9 +
877                                                                                       [6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 7 + 8 + 9 +
878                                                                               [6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 7 + 8 + 9 +
879                                   [6 5 4 3 2 1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 7 + 8 + 9 +
880                 [6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[6 5 4 3 2 1 0]] [[] =] . infra first choice i 7 + 8 + 9 +
881                                                                                                                    [6 5 4 3 2 1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [6 5 4 3 2 1 0]] swaack first choice i 7 + 8 + 9 +
882                                                                                                                 [6 5 4 3 2 1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [6 5 4 3 2 1 0]] swaack first choice i 7 + 8 + 9 +
883                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [6 5 4 3 2 1 0]] swaack first choice i 7 + 8 + 9 +
884                                  False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [6 5 4 3 2 1 0]] . swaack first choice i 7 + 8 + 9 +
885                                  [6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 7 + 8 + 9 +
886                                    [6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 7 + 8 + 9 +
887                                                  [6 5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 7 + 8 + 9 +
888                                                                                                                    [6 5 4 3 2 1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 7 + 8 + 9 +
889                                                                                                                    6 [5 4 3 2 1 0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 7 + 8 + 9 +
890                                                                                                                    [5 4 3 2 1 0] 6 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 7 + 8 + 9 +
891                                                                      [5 4 3 2 1 0] 6 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 7 + 8 + 9 +
892                                                                                                                      [5 4 3 2 1 0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 6 + 7 + 8 + 9 +
893                                                                                                               [5 4 3 2 1 0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 6 + 7 + 8 + 9 +
894                                                                                                       [5 4 3 2 1 0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 6 + 7 + 8 + 9 +
895                                                                                         [5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 6 + 7 + 8 + 9 +
896                                                                                 [5 4 3 2 1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 6 + 7 + 8 + 9 +
897                                     [5 4 3 2 1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 6 + 7 + 8 + 9 +
898                     [5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[5 4 3 2 1 0]] [[] =] . infra first choice i 6 + 7 + 8 + 9 +
899                                                                                                                      [5 4 3 2 1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [5 4 3 2 1 0]] swaack first choice i 6 + 7 + 8 + 9 +
900                                                                                                                   [5 4 3 2 1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [5 4 3 2 1 0]] swaack first choice i 6 + 7 + 8 + 9 +
901                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [5 4 3 2 1 0]] swaack first choice i 6 + 7 + 8 + 9 +
902                                    False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [5 4 3 2 1 0]] . swaack first choice i 6 + 7 + 8 + 9 +
903                                    [5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 6 + 7 + 8 + 9 +
904                                      [5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 6 + 7 + 8 + 9 +
905                                                    [5 4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 6 + 7 + 8 + 9 +
906                                                                                                                      [5 4 3 2 1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 6 + 7 + 8 + 9 +
907                                                                                                                      5 [4 3 2 1 0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 6 + 7 + 8 + 9 +
908                                                                                                                      [4 3 2 1 0] 5 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 6 + 7 + 8 + 9 +
909                                                                        [4 3 2 1 0] 5 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 6 + 7 + 8 + 9 +
910                                                                                                                        [4 3 2 1 0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 5 + 6 + 7 + 8 + 9 +
911                                                                                                                 [4 3 2 1 0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 5 + 6 + 7 + 8 + 9 +
912                                                                                                         [4 3 2 1 0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 5 + 6 + 7 + 8 + 9 +
913                                                                                           [4 3 2 1 0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 5 + 6 + 7 + 8 + 9 +
914                                                                                   [4 3 2 1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 5 + 6 + 7 + 8 + 9 +
915                                       [4 3 2 1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 5 + 6 + 7 + 8 + 9 +
916                         [4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[4 3 2 1 0]] [[] =] . infra first choice i 5 + 6 + 7 + 8 + 9 +
917                                                                                                                        [4 3 2 1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [4 3 2 1 0]] swaack first choice i 5 + 6 + 7 + 8 + 9 +
918                                                                                                                     [4 3 2 1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [4 3 2 1 0]] swaack first choice i 5 + 6 + 7 + 8 + 9 +
919                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [4 3 2 1 0]] swaack first choice i 5 + 6 + 7 + 8 + 9 +
920                                      False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [4 3 2 1 0]] . swaack first choice i 5 + 6 + 7 + 8 + 9 +
921                                      [4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 5 + 6 + 7 + 8 + 9 +
922                                        [4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 5 + 6 + 7 + 8 + 9 +
923                                                      [4 3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 5 + 6 + 7 + 8 + 9 +
924                                                                                                                        [4 3 2 1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 5 + 6 + 7 + 8 + 9 +
925                                                                                                                        4 [3 2 1 0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 5 + 6 + 7 + 8 + 9 +
926                                                                                                                        [3 2 1 0] 4 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 5 + 6 + 7 + 8 + 9 +
927                                                                          [3 2 1 0] 4 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 5 + 6 + 7 + 8 + 9 +
928                                                                                                                          [3 2 1 0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 4 + 5 + 6 + 7 + 8 + 9 +
929                                                                                                                   [3 2 1 0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 4 + 5 + 6 + 7 + 8 + 9 +
930                                                                                                           [3 2 1 0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 4 + 5 + 6 + 7 + 8 + 9 +
931                                                                                             [3 2 1 0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 4 + 5 + 6 + 7 + 8 + 9 +
932                                                                                     [3 2 1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 4 + 5 + 6 + 7 + 8 + 9 +
933                                         [3 2 1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 4 + 5 + 6 + 7 + 8 + 9 +
934                             [3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[3 2 1 0]] [[] =] . infra first choice i 4 + 5 + 6 + 7 + 8 + 9 +
935                                                                                                                          [3 2 1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [3 2 1 0]] swaack first choice i 4 + 5 + 6 + 7 + 8 + 9 +
936                                                                                                                       [3 2 1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [3 2 1 0]] swaack first choice i 4 + 5 + 6 + 7 + 8 + 9 +
937                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [3 2 1 0]] swaack first choice i 4 + 5 + 6 + 7 + 8 + 9 +
938                                        False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [3 2 1 0]] . swaack first choice i 4 + 5 + 6 + 7 + 8 + 9 +
939                                        [3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 4 + 5 + 6 + 7 + 8 + 9 +
940                                          [3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 4 + 5 + 6 + 7 + 8 + 9 +
941                                                        [3 2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 4 + 5 + 6 + 7 + 8 + 9 +
942                                                                                                                          [3 2 1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 4 + 5 + 6 + 7 + 8 + 9 +
943                                                                                                                          3 [2 1 0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 4 + 5 + 6 + 7 + 8 + 9 +
944                                                                                                                          [2 1 0] 3 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 4 + 5 + 6 + 7 + 8 + 9 +
945                                                                            [2 1 0] 3 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 4 + 5 + 6 + 7 + 8 + 9 +
946                                                                                                                            [2 1 0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
947                                                                                                                     [2 1 0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
948                                                                                                             [2 1 0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
949                                                                                               [2 1 0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
950                                                                                       [2 1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
951                                           [2 1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 3 + 4 + 5 + 6 + 7 + 8 + 9 +
952                                 [2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[2 1 0]] [[] =] . infra first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
953                                                                                                                            [2 1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [2 1 0]] swaack first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
954                                                                                                                         [2 1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [2 1 0]] swaack first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
955                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [2 1 0]] swaack first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
956                                          False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [2 1 0]] . swaack first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
957                                          [2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
958                                            [2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
959                                                          [2 1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
960                                                                                                                            [2 1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
961                                                                                                                            2 [1 0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
962                                                                                                                            [1 0] 2 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
963                                                                              [1 0] 2 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
964                                                                                                                              [1 0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
965                                                                                                                       [1 0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
966                                                                                                               [1 0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
967                                                                                                 [1 0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
968                                                                                         [1 0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
969                                             [1 0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
970                                     [1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[1 0]] [[] =] . infra first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
971                                                                                                                              [1 0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [1 0]] swaack first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
972                                                                                                                           [1 0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [1 0]] swaack first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
973                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [1 0]] swaack first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
974                                            False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [1 0]] . swaack first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
975                                            [1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
976                                              [1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
977                                                            [1 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
978                                                                                                                              [1 0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
979                                                                                                                              1 [0] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
980                                                                                                                              [0] 1 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
981                                                                                [0] 1 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
982                                                                                                                                [0] . [[] =] [pop 0] [uncons swap] [dip +] genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
983                                                                                                                         [0] [[] =] . [pop 0] [uncons swap] [dip +] genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
984                                                                                                                 [0] [[] =] [pop 0] . [uncons swap] [dip +] genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
985                                                                                                   [0] [[] =] [pop 0] [uncons swap] . [dip +] genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
986                                                                                           [0] [[] =] [pop 0] [uncons swap] [dip +] . genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
987                                               [0] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
988                                         [0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[0]] [[] =] . infra first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
989                                                                                                                                [0] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [0]] swaack first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
990                                                                                                                             [0] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [0]] swaack first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
991                                                                                                                              False . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [0]] swaack first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
992                                              False [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [0]] . swaack first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
993                                              [0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [False] . first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
994                                                [0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] False . choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
995                                                              [0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
996                                                                                                                                [0] . uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
997                                                                                                                               0 [] . swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
998                                                                                                                               [] 0 . [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
999                                                                                 [] 0 [[[] =] [pop 0] [uncons swap] [dip +] genrec] . dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1000                                                                                                                                 [] . [[] =] [pop 0] [uncons swap] [dip +] genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1001                                                                                                                          [] [[] =] . [pop 0] [uncons swap] [dip +] genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1002                                                                                                                  [] [[] =] [pop 0] . [uncons swap] [dip +] genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1003                                                                                                    [] [[] =] [pop 0] [uncons swap] . [dip +] genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1004                                                                                            [] [[] =] [pop 0] [uncons swap] [dip +] . genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1005                                                [] [[] =] [pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] . ifte 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1006                                           [] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [[]] [[] =] . infra first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1007                                                                                                                                 [] . [] = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] []] swaack first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1008                                                                                                                              [] [] . = [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] []] swaack first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1009                                                                                                                               True . [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] []] swaack first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1010                                                True [[pop 0] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] []] . swaack first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1011                                                [] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] [True] . first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1012                                                  [] [uncons swap [[[] =] [pop 0] [uncons swap] [dip +] genrec] dip +] [pop 0] True . choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1013                                                                                                                         [] [pop 0] . i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1014                                                                                                                                 [] . pop 0 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1015                                                                                                                                    . 0 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1016                                                                                                                                  0 . 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1017                                                                                                                                0 0 . + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1018                                                                                                                                  0 . 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1019                                                                                                                                0 1 . + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1020                                                                                                                                  1 . 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1021                                                                                                                                1 2 . + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1022                                                                                                                                  3 . 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1023                                                                                                                                3 3 . + 4 + 5 + 6 + 7 + 8 + 9 +
1024                                                                                                                                  6 . 4 + 5 + 6 + 7 + 8 + 9 +
1025                                                                                                                                6 4 . + 5 + 6 + 7 + 8 + 9 +
1026                                                                                                                                 10 . 5 + 6 + 7 + 8 + 9 +
1027                                                                                                                               10 5 . + 6 + 7 + 8 + 9 +
1028                                                                                                                                 15 . 6 + 7 + 8 + 9 +
1029                                                                                                                               15 6 . + 7 + 8 + 9 +
1030                                                                                                                                 21 . 7 + 8 + 9 +
1031                                                                                                                               21 7 . + 8 + 9 +
1032                                                                                                                                 28 . 8 + 9 +
1033                                                                                                                               28 8 . + 9 +
1034                                                                                                                                 36 . 9 +
1035                                                                                                                               36 9 . +
1036                                                                                                                                 45 . 
1037
1038
1039
1040 ```python
1041 V('10 range_sum')
1042 ```
1043
1044                                                                                      . 10 range_sum
1045                                                                                   10 . range_sum
1046                                                                                   10 . [0 <=] 0 [1 - dup] [+] hylomorphism
1047                                                                            10 [0 <=] . 0 [1 - dup] [+] hylomorphism
1048                                                                          10 [0 <=] 0 . [1 - dup] [+] hylomorphism
1049                                                                10 [0 <=] 0 [1 - dup] . [+] hylomorphism
1050                                                            10 [0 <=] 0 [1 - dup] [+] . hylomorphism
1051                                                            10 [0 <=] 0 [1 - dup] [+] . [unit [pop] swoncat] dipd [dip] swoncat genrec
1052                                       10 [0 <=] 0 [1 - dup] [+] [unit [pop] swoncat] . dipd [dip] swoncat genrec
1053                                                                          10 [0 <=] 0 . unit [pop] swoncat [1 - dup] [+] [dip] swoncat genrec
1054                                                                          10 [0 <=] 0 . [] cons [pop] swoncat [1 - dup] [+] [dip] swoncat genrec
1055                                                                       10 [0 <=] 0 [] . cons [pop] swoncat [1 - dup] [+] [dip] swoncat genrec
1056                                                                        10 [0 <=] [0] . [pop] swoncat [1 - dup] [+] [dip] swoncat genrec
1057                                                                  10 [0 <=] [0] [pop] . swoncat [1 - dup] [+] [dip] swoncat genrec
1058                                                                  10 [0 <=] [0] [pop] . swap concat [1 - dup] [+] [dip] swoncat genrec
1059                                                                  10 [0 <=] [pop] [0] . concat [1 - dup] [+] [dip] swoncat genrec
1060                                                                    10 [0 <=] [pop 0] . [1 - dup] [+] [dip] swoncat genrec
1061                                                          10 [0 <=] [pop 0] [1 - dup] . [+] [dip] swoncat genrec
1062                                                      10 [0 <=] [pop 0] [1 - dup] [+] . [dip] swoncat genrec
1063                                                10 [0 <=] [pop 0] [1 - dup] [+] [dip] . swoncat genrec
1064                                                10 [0 <=] [pop 0] [1 - dup] [+] [dip] . swap concat genrec
1065                                                10 [0 <=] [pop 0] [1 - dup] [dip] [+] . concat genrec
1066                                                  10 [0 <=] [pop 0] [1 - dup] [dip +] . genrec
1067          10 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte
1068     10 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [10] [0 <=] . infra first choice i
1069                                                                                   10 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 10] swaack first choice i
1070                                                                                 10 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 10] swaack first choice i
1071                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 10] swaack first choice i
1072         False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 10] . swaack first choice i
1073         10 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i
1074           10 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i
1075                         10 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i
1076                                                                                   10 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +
1077                                                                                 10 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +
1078                                                                                    9 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +
1079                                                                                  9 9 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +
1080                                        9 9 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip +
1081                                                                                    9 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 9 +
1082                                                                             9 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 9 +
1083                                                                     9 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 9 +
1084                                                           9 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 9 +
1085                                                   9 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 9 +
1086           9 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 9 +
1087       9 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [9] [0 <=] . infra first choice i 9 +
1088                                                                                    9 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 9] swaack first choice i 9 +
1089                                                                                  9 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 9] swaack first choice i 9 +
1090                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 9] swaack first choice i 9 +
1091          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 9] . swaack first choice i 9 +
1092          9 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 9 +
1093            9 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 9 +
1094                          9 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 9 +
1095                                                                                    9 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 9 +
1096                                                                                  9 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 9 +
1097                                                                                    8 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 9 +
1098                                                                                  8 8 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 9 +
1099                                        8 8 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 9 +
1100                                                                                    8 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 8 + 9 +
1101                                                                             8 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 8 + 9 +
1102                                                                     8 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 8 + 9 +
1103                                                           8 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 8 + 9 +
1104                                                   8 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 8 + 9 +
1105           8 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 8 + 9 +
1106       8 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [8] [0 <=] . infra first choice i 8 + 9 +
1107                                                                                    8 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 8] swaack first choice i 8 + 9 +
1108                                                                                  8 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 8] swaack first choice i 8 + 9 +
1109                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 8] swaack first choice i 8 + 9 +
1110          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 8] . swaack first choice i 8 + 9 +
1111          8 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 8 + 9 +
1112            8 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 8 + 9 +
1113                          8 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 8 + 9 +
1114                                                                                    8 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 8 + 9 +
1115                                                                                  8 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 8 + 9 +
1116                                                                                    7 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 8 + 9 +
1117                                                                                  7 7 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 8 + 9 +
1118                                        7 7 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 8 + 9 +
1119                                                                                    7 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 7 + 8 + 9 +
1120                                                                             7 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 7 + 8 + 9 +
1121                                                                     7 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 7 + 8 + 9 +
1122                                                           7 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 7 + 8 + 9 +
1123                                                   7 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 7 + 8 + 9 +
1124           7 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 7 + 8 + 9 +
1125       7 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [7] [0 <=] . infra first choice i 7 + 8 + 9 +
1126                                                                                    7 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 7] swaack first choice i 7 + 8 + 9 +
1127                                                                                  7 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 7] swaack first choice i 7 + 8 + 9 +
1128                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 7] swaack first choice i 7 + 8 + 9 +
1129          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 7] . swaack first choice i 7 + 8 + 9 +
1130          7 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 7 + 8 + 9 +
1131            7 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 7 + 8 + 9 +
1132                          7 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 7 + 8 + 9 +
1133                                                                                    7 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 7 + 8 + 9 +
1134                                                                                  7 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 7 + 8 + 9 +
1135                                                                                    6 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 7 + 8 + 9 +
1136                                                                                  6 6 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 7 + 8 + 9 +
1137                                        6 6 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 7 + 8 + 9 +
1138                                                                                    6 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 6 + 7 + 8 + 9 +
1139                                                                             6 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 6 + 7 + 8 + 9 +
1140                                                                     6 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 6 + 7 + 8 + 9 +
1141                                                           6 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 6 + 7 + 8 + 9 +
1142                                                   6 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 6 + 7 + 8 + 9 +
1143           6 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 6 + 7 + 8 + 9 +
1144       6 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [6] [0 <=] . infra first choice i 6 + 7 + 8 + 9 +
1145                                                                                    6 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 6] swaack first choice i 6 + 7 + 8 + 9 +
1146                                                                                  6 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 6] swaack first choice i 6 + 7 + 8 + 9 +
1147                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 6] swaack first choice i 6 + 7 + 8 + 9 +
1148          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 6] . swaack first choice i 6 + 7 + 8 + 9 +
1149          6 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 6 + 7 + 8 + 9 +
1150            6 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 6 + 7 + 8 + 9 +
1151                          6 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 6 + 7 + 8 + 9 +
1152                                                                                    6 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 6 + 7 + 8 + 9 +
1153                                                                                  6 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 6 + 7 + 8 + 9 +
1154                                                                                    5 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 6 + 7 + 8 + 9 +
1155                                                                                  5 5 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 6 + 7 + 8 + 9 +
1156                                        5 5 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 6 + 7 + 8 + 9 +
1157                                                                                    5 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 5 + 6 + 7 + 8 + 9 +
1158                                                                             5 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 5 + 6 + 7 + 8 + 9 +
1159                                                                     5 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 5 + 6 + 7 + 8 + 9 +
1160                                                           5 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 5 + 6 + 7 + 8 + 9 +
1161                                                   5 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 5 + 6 + 7 + 8 + 9 +
1162           5 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 5 + 6 + 7 + 8 + 9 +
1163       5 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [5] [0 <=] . infra first choice i 5 + 6 + 7 + 8 + 9 +
1164                                                                                    5 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 5] swaack first choice i 5 + 6 + 7 + 8 + 9 +
1165                                                                                  5 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 5] swaack first choice i 5 + 6 + 7 + 8 + 9 +
1166                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 5] swaack first choice i 5 + 6 + 7 + 8 + 9 +
1167          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 5] . swaack first choice i 5 + 6 + 7 + 8 + 9 +
1168          5 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 5 + 6 + 7 + 8 + 9 +
1169            5 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 5 + 6 + 7 + 8 + 9 +
1170                          5 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 5 + 6 + 7 + 8 + 9 +
1171                                                                                    5 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 5 + 6 + 7 + 8 + 9 +
1172                                                                                  5 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 5 + 6 + 7 + 8 + 9 +
1173                                                                                    4 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 5 + 6 + 7 + 8 + 9 +
1174                                                                                  4 4 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 5 + 6 + 7 + 8 + 9 +
1175                                        4 4 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 5 + 6 + 7 + 8 + 9 +
1176                                                                                    4 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 4 + 5 + 6 + 7 + 8 + 9 +
1177                                                                             4 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 4 + 5 + 6 + 7 + 8 + 9 +
1178                                                                     4 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 4 + 5 + 6 + 7 + 8 + 9 +
1179                                                           4 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 4 + 5 + 6 + 7 + 8 + 9 +
1180                                                   4 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 4 + 5 + 6 + 7 + 8 + 9 +
1181           4 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 4 + 5 + 6 + 7 + 8 + 9 +
1182       4 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [4] [0 <=] . infra first choice i 4 + 5 + 6 + 7 + 8 + 9 +
1183                                                                                    4 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 4] swaack first choice i 4 + 5 + 6 + 7 + 8 + 9 +
1184                                                                                  4 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 4] swaack first choice i 4 + 5 + 6 + 7 + 8 + 9 +
1185                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 4] swaack first choice i 4 + 5 + 6 + 7 + 8 + 9 +
1186          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 4] . swaack first choice i 4 + 5 + 6 + 7 + 8 + 9 +
1187          4 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 4 + 5 + 6 + 7 + 8 + 9 +
1188            4 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 4 + 5 + 6 + 7 + 8 + 9 +
1189                          4 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 4 + 5 + 6 + 7 + 8 + 9 +
1190                                                                                    4 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 4 + 5 + 6 + 7 + 8 + 9 +
1191                                                                                  4 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 4 + 5 + 6 + 7 + 8 + 9 +
1192                                                                                    3 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 4 + 5 + 6 + 7 + 8 + 9 +
1193                                                                                  3 3 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 4 + 5 + 6 + 7 + 8 + 9 +
1194                                        3 3 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 4 + 5 + 6 + 7 + 8 + 9 +
1195                                                                                    3 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1196                                                                             3 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1197                                                                     3 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1198                                                           3 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1199                                                   3 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1200           3 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1201       3 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [3] [0 <=] . infra first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1202                                                                                    3 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 3] swaack first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1203                                                                                  3 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 3] swaack first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1204                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 3] swaack first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1205          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 3] . swaack first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1206          3 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1207            3 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1208                          3 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1209                                                                                    3 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1210                                                                                  3 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1211                                                                                    2 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1212                                                                                  2 2 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1213                                        2 2 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1214                                                                                    2 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1215                                                                             2 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1216                                                                     2 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1217                                                           2 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1218                                                   2 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1219           2 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1220       2 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [2] [0 <=] . infra first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1221                                                                                    2 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 2] swaack first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1222                                                                                  2 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 2] swaack first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1223                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 2] swaack first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1224          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 2] . swaack first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1225          2 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1226            2 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1227                          2 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1228                                                                                    2 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1229                                                                                  2 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1230                                                                                    1 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1231                                                                                  1 1 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1232                                        1 1 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1233                                                                                    1 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1234                                                                             1 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1235                                                                     1 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1236                                                           1 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1237                                                   1 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1238           1 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1239       1 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [1] [0 <=] . infra first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1240                                                                                    1 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 1] swaack first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1241                                                                                  1 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 1] swaack first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1242                                                                                False . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 1] swaack first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1243          False [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 1] . swaack first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1244          1 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [False] . first choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1245            1 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] False . choice i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1246                          1 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . i 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1247                                                                                    1 . 1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1248                                                                                  1 1 . - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1249                                                                                    0 . dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1250                                                                                  0 0 . [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1251                                        0 0 [[0 <=] [pop 0] [1 - dup] [dip +] genrec] . dip + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1252                                                                                    0 . [0 <=] [pop 0] [1 - dup] [dip +] genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1253                                                                             0 [0 <=] . [pop 0] [1 - dup] [dip +] genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1254                                                                     0 [0 <=] [pop 0] . [1 - dup] [dip +] genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1255                                                           0 [0 <=] [pop 0] [1 - dup] . [dip +] genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1256                                                   0 [0 <=] [pop 0] [1 - dup] [dip +] . genrec 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1257           0 [0 <=] [pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] . ifte 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1258       0 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [0] [0 <=] . infra first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1259                                                                                    0 . 0 <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 0] swaack first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1260                                                                                  0 0 . <= [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 0] swaack first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1261                                                                                 True . [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 0] swaack first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1262           True [[pop 0] [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] 0] . swaack first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1263           0 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] [True] . first choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1264             0 [1 - dup [[0 <=] [pop 0] [1 - dup] [dip +] genrec] dip +] [pop 0] True . choice i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1265                                                                            0 [pop 0] . i 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1266                                                                                    0 . pop 0 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1267                                                                                      . 0 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1268                                                                                    0 . 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1269                                                                                  0 0 . + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1270                                                                                    0 . 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1271                                                                                  0 1 . + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1272                                                                                    1 . 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1273                                                                                  1 2 . + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1274                                                                                    3 . 3 + 4 + 5 + 6 + 7 + 8 + 9 +
1275                                                                                  3 3 . + 4 + 5 + 6 + 7 + 8 + 9 +
1276                                                                                    6 . 4 + 5 + 6 + 7 + 8 + 9 +
1277                                                                                  6 4 . + 5 + 6 + 7 + 8 + 9 +
1278                                                                                   10 . 5 + 6 + 7 + 8 + 9 +
1279                                                                                 10 5 . + 6 + 7 + 8 + 9 +
1280                                                                                   15 . 6 + 7 + 8 + 9 +
1281                                                                                 15 6 . + 7 + 8 + 9 +
1282                                                                                   21 . 7 + 8 + 9 +
1283                                                                                 21 7 . + 8 + 9 +
1284                                                                                   28 . 8 + 9 +
1285                                                                                 28 8 . + 9 +
1286                                                                                   36 . 9 +
1287                                                                                 36 9 . +
1288                                                                                   45 . 
1289
1290
1291 # Factorial Function and Paramorphisms
1292 A paramorphism `P :: B -> A` is a recursion combinator that uses `dup` on intermediate values.
1293
1294     n swap [P] [pop] [[F] dupdip G] primrec
1295
1296 With
1297 - `n :: A` is the "identity" for `F` (like 1 for multiplication, 0 for addition)
1298 - `F :: (A, B) -> A`
1299 - `G :: B -> B` generates the next `B` value.
1300 - and lastly `P :: B -> Bool` detects the end of the series.
1301
1302 For Factorial function (types `A` and `B` are both integer):
1303
1304     n == 1
1305     F == *
1306     G == --
1307     P == 1 <=
1308
1309
1310 ```python
1311 define('factorial == 1 swap [1 <=] [pop] [[*] dupdip --] primrec')
1312 ```
1313
1314 Try it with input 3 (omitting evaluation of predicate):
1315
1316     3 1 swap [1 <=] [pop] [[*] dupdip --] primrec
1317     1 3      [1 <=] [pop] [[*] dupdip --] primrec
1318
1319     1 3 [*] dupdip --
1320     1 3  * 3      --
1321     3      3      --
1322     3      2
1323
1324     3 2 [*] dupdip --
1325     3 2  *  2      --
1326     6       2      --
1327     6       1
1328
1329     6 1 [1 <=] [pop] [[*] dupdip --] primrec
1330
1331     6 1 pop
1332     6
1333
1334
1335 ```python
1336 J('3 factorial')
1337 ```
1338
1339     6
1340
1341
1342 ### Derive `paramorphism` from the form above.
1343
1344     n swap [P] [pop] [[F] dupdip G] primrec
1345
1346     n swap [P]       [pop]     [[F] dupdip G]                  primrec
1347     n [P] [swap] dip [pop]     [[F] dupdip G]                  primrec
1348     n [P] [[F] dupdip G]                [[swap] dip [pop]] dip primrec
1349     n [P] [F] [dupdip G]           cons [[swap] dip [pop]] dip primrec
1350     n [P] [F] [G] [dupdip] swoncat cons [[swap] dip [pop]] dip primrec
1351
1352     paramorphism == [dupdip] swoncat cons [[swap] dip [pop]] dip primrec
1353
1354
1355 ```python
1356 define('paramorphism == [dupdip] swoncat cons [[swap] dip [pop]] dip primrec')
1357 define('factorial == 1 [1 <=] [*] [--] paramorphism')
1358 ```
1359
1360
1361 ```python
1362 J('3 factorial')
1363 ```
1364
1365     6
1366
1367
1368 # `tails`
1369 An example of a paramorphism for lists given in the ["Bananas..." paper](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.125) is `tails` which returns the list of "tails" of a list.
1370
1371     [1 2 3] tails == [[] [3] [2 3]]
1372     
1373 Using `paramorphism` we would write:
1374
1375     n == []
1376     F == rest swons
1377     G == rest
1378     P == not
1379
1380     tails == [] [not] [rest swons] [rest] paramorphism
1381
1382
1383 ```python
1384 define('tails == [] [not] [rest swons] [rest] paramorphism')
1385 ```
1386
1387
1388 ```python
1389 J('[1 2 3] tails')
1390 ```
1391
1392     [[] [3] [2 3]]
1393
1394
1395
1396 ```python
1397 J('25 range tails [popop] infra [sum] map')
1398 ```
1399
1400     [1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 210 231 253 276]
1401
1402
1403
1404 ```python
1405 J('25 range [range_sum] map')
1406 ```
1407
1408     [276 253 231 210 190 171 153 136 120 105 91 78 66 55 45 36 28 21 15 10 6 3 1 0 0]
1409
1410
1411 ### Factoring `rest`
1412 Right before the recursion begins we have:
1413     
1414     [] [1 2 3] [not] [pop] [[rest swons] dupdip rest] primrec
1415     
1416 But we might prefer to factor `rest` in the quote:
1417
1418     [] [1 2 3] [not] [pop] [rest [swons] dupdip] primrec
1419
1420 There's no way to do that with the `paramorphism` combinator as defined.  We would have to write and use a slightly different recursion combinator that accepted an additional "preprocessor" function `[H]` and built:
1421
1422     n swap [P] [pop] [H [F] dupdip G] primrec
1423
1424 Or just write it out manually.  This is yet another place where the *sufficiently smart compiler* will one day automatically refactor the code.  We could write a `paramorphism` combinator that checked `[F]` and `[G]` for common prefix and extracted it.
1425
1426 # Patterns of Recursion
1427 Our story so far...
1428
1429 - A combiner `F :: (B, B) -> B`
1430 - A predicate `P :: A -> Bool` to detect the base case
1431 - A base case value `c :: B`
1432
1433
1434 ### Hylo-, Ana-, Cata-
1435
1436     w/ G :: A -> (A, B)
1437
1438     H == [P   ] [pop c ] [G          ] [dip F    ] genrec
1439     A == [P   ] [pop []] [G          ] [dip swons] genrec
1440     C == [[] =] [pop c ] [uncons swap] [dip F    ] genrec
1441
1442 ### Para-, ?-, ?-
1443
1444     w/ G :: B -> B
1445
1446     P == c  swap [P   ] [pop] [[F    ] dupdip G          ] primrec
1447     ? == [] swap [P   ] [pop] [[swons] dupdip G          ] primrec
1448     ? == c  swap [[] =] [pop] [[F    ] dupdip uncons swap] primrec
1449
1450
1451 # Four Generalizations
1452 There are at least four kinds of recursive combinator, depending on two choices.  The first choice is whether the combiner function should be evaluated during the recursion or pushed into the pending expression to be "collapsed" at the end.  The second choice is whether the combiner needs to operate on the current value of the datastructure or the generator's output.
1453
1454     H ==        [P] [pop c] [G             ] [dip F] genrec
1455     H == c swap [P] [pop]   [G [F]    dip  ] [i]     genrec
1456     H ==        [P] [pop c] [  [G] dupdip  ] [dip F] genrec
1457     H == c swap [P] [pop]   [  [F] dupdip G] [i]     genrec
1458
1459 Consider:
1460
1461     ... a G [H] dip F                w/ a G == a' b
1462     ... c a G [F] dip H                 a G == b  a'
1463     ... a [G] dupdip [H] dip F          a G == a'
1464     ... c a [F] dupdip G H              a G == a'
1465
1466 ### 1
1467
1468     H == [P] [pop c] [G] [dip F] genrec
1469
1470 Iterate n times.
1471
1472     ... a [P] [pop c] [G] [dip F] genrec
1473     ... a  G [H] dip F
1474     ... a' b [H] dip F
1475     ... a' H b F
1476     ... a'  G [H] dip F b F
1477     ... a'' b [H] dip F b F
1478     ... a'' H b F b F
1479     ... a''  G [H] dip F b F b F
1480     ... a''' b [H] dip F b F b F
1481     ... a''' H b F b F b F
1482     ... a''' pop c b F b F b F
1483     ... c b F b F b F
1484
1485 This form builds up a continuation that contains the intermediate results along with the pending combiner functions.  When the base case is reached the last term is replaced by the identity value c and the continuation "collapses" into the final result.
1486
1487 ### 2
1488 When you can start with the identity value c on the stack and the combiner can operate as you go, using the intermediate results immediately rather than queuing them up, use this form.  An important difference is that the generator function must return its results in the reverse order.
1489
1490     H == c swap [P] [pop] [G [F] dip] primrec
1491
1492     ... c a G [F] dip H
1493     ... c b a' [F] dip H
1494     ... c b F a' H
1495     ... c b F a' G [F] dip H
1496     ... c b F b a'' [F] dip H
1497     ... c b F b F a'' H
1498     ... c b F b F a'' G [F] dip H
1499     ... c b F b F b a''' [F] dip H
1500     ... c b F b F b F a''' H
1501     ... c b F b F b F a''' pop
1502     ... c b F b F b F
1503
1504 The end line here is the same as for above, but only because we didn't evaluate `F` when it normally would have been.
1505
1506 ### 3
1507 If the combiner and the generator both need to work on the current value then `dup` must be used at some point, and the generator must produce one item instead of two (the b is instead the duplicate of a.)
1508
1509
1510     H == [P] [pop c] [[G] dupdip] [dip F] genrec
1511
1512     ... a [G] dupdip [H] dip F
1513     ... a  G a       [H] dip F
1514     ... a'   a       [H] dip F
1515     ... a' H a F
1516     ... a' [G] dupdip [H] dip F a F
1517     ... a'  G  a'     [H] dip F a F
1518     ... a''    a'     [H] dip F a F
1519     ... a'' H  a' F a F
1520     ... a'' [G] dupdip [H] dip F a' F a F
1521     ... a''  G  a''    [H] dip F a' F a F
1522     ... a'''    a''    [H] dip F a' F a F
1523     ... a''' H  a'' F a' F a F
1524     ... a''' pop c  a'' F a' F a F
1525     ...          c  a'' F a' F a F
1526
1527 ### 4
1528 And, last but not least, if you can combine as you go, starting with c, and the combiner needs to work on the current item, this is the form:
1529
1530     W == c swap [P] [pop] [[F] dupdip G] primrec
1531
1532     ... a c swap [P] [pop] [[F] dupdip G] primrec
1533     ... c a [P] [pop] [[F] dupdip G] primrec
1534     ... c a [F] dupdip G W
1535     ... c a  F a G W
1536     ... c a  F a'  W
1537     ... c a  F a'  [F] dupdip G W
1538     ... c a  F a'   F  a'     G W
1539     ... c a  F a'   F  a''      W
1540     ... c a  F a'   F  a''      [F] dupdip G W
1541     ... c a  F a'   F  a''       F  a''    G W
1542     ... c a  F a'   F  a''       F  a'''     W
1543     ... c a  F a'   F  a''       F  a'''     pop
1544     ... c a  F a'   F  a''       F
1545
1546 Each of the four variations above can be specialized to ana- and catamorphic forms.
1547
1548
1549 ```python
1550 def WTFmorphism(c, F, P, G):
1551     '''Return a hylomorphism function H.'''
1552
1553     def H(a, d=c):
1554         if P(a):
1555             result = d
1556         else:
1557             a, b = G(a)
1558             result = H(a, F(d, b))
1559         return result
1560
1561     return H
1562 ```
1563
1564
1565 ```python
1566 F = lambda a, b: a + b
1567 P = lambda n: n <= 1
1568 G = lambda n: (n - 1, n - 1)
1569
1570 wtf = WTFmorphism(0, F, P, G)
1571
1572 print wtf(5)
1573 ```
1574
1575     10
1576
1577
1578     H == [P   ] [pop c ] [G          ] [dip F    ] genrec
1579
1580
1581 ```python
1582 DefinitionWrapper.add_definitions('''
1583 P == 1 <=
1584 Ga == -- dup
1585 Gb == --
1586 c == 0
1587 F == +
1588 ''', D)
1589 ```
1590
1591
1592 ```python
1593 V('[1 2 3] [[] =] [pop []] [uncons swap] [dip swons] genrec')
1594 ```
1595
1596                                                                                                                  . [1 2 3] [[] =] [pop []] [uncons swap] [dip swons] genrec
1597                                                                                                          [1 2 3] . [[] =] [pop []] [uncons swap] [dip swons] genrec
1598                                                                                                   [1 2 3] [[] =] . [pop []] [uncons swap] [dip swons] genrec
1599                                                                                          [1 2 3] [[] =] [pop []] . [uncons swap] [dip swons] genrec
1600                                                                            [1 2 3] [[] =] [pop []] [uncons swap] . [dip swons] genrec
1601                                                                [1 2 3] [[] =] [pop []] [uncons swap] [dip swons] . genrec
1602               [1 2 3] [[] =] [pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] . ifte
1603     [1 2 3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] [[1 2 3]] [[] =] . infra first choice i
1604                                                                                                          [1 2 3] . [] = [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [1 2 3]] swaack first choice i
1605                                                                                                       [1 2 3] [] . = [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [1 2 3]] swaack first choice i
1606                                                                                                            False . [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [1 2 3]] swaack first choice i
1607              False [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [1 2 3]] . swaack first choice i
1608              [1 2 3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] [False] . first choice i
1609                [1 2 3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] False . choice i
1610                               [1 2 3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] . i
1611                                                                                                          [1 2 3] . uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons
1612                                                                                                          1 [2 3] . swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons
1613                                                                                                          [2 3] 1 . [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons
1614                                                       [2 3] 1 [[[] =] [pop []] [uncons swap] [dip swons] genrec] . dip swons
1615                                                                                                            [2 3] . [[] =] [pop []] [uncons swap] [dip swons] genrec 1 swons
1616                                                                                                     [2 3] [[] =] . [pop []] [uncons swap] [dip swons] genrec 1 swons
1617                                                                                            [2 3] [[] =] [pop []] . [uncons swap] [dip swons] genrec 1 swons
1618                                                                              [2 3] [[] =] [pop []] [uncons swap] . [dip swons] genrec 1 swons
1619                                                                  [2 3] [[] =] [pop []] [uncons swap] [dip swons] . genrec 1 swons
1620                 [2 3] [[] =] [pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] . ifte 1 swons
1621         [2 3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] [[2 3]] [[] =] . infra first choice i 1 swons
1622                                                                                                            [2 3] . [] = [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [2 3]] swaack first choice i 1 swons
1623                                                                                                         [2 3] [] . = [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [2 3]] swaack first choice i 1 swons
1624                                                                                                            False . [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [2 3]] swaack first choice i 1 swons
1625                False [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [2 3]] . swaack first choice i 1 swons
1626                [2 3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 1 swons
1627                  [2 3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] False . choice i 1 swons
1628                                 [2 3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] . i 1 swons
1629                                                                                                            [2 3] . uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons 1 swons
1630                                                                                                            2 [3] . swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons 1 swons
1631                                                                                                            [3] 2 . [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons 1 swons
1632                                                         [3] 2 [[[] =] [pop []] [uncons swap] [dip swons] genrec] . dip swons 1 swons
1633                                                                                                              [3] . [[] =] [pop []] [uncons swap] [dip swons] genrec 2 swons 1 swons
1634                                                                                                       [3] [[] =] . [pop []] [uncons swap] [dip swons] genrec 2 swons 1 swons
1635                                                                                              [3] [[] =] [pop []] . [uncons swap] [dip swons] genrec 2 swons 1 swons
1636                                                                                [3] [[] =] [pop []] [uncons swap] . [dip swons] genrec 2 swons 1 swons
1637                                                                    [3] [[] =] [pop []] [uncons swap] [dip swons] . genrec 2 swons 1 swons
1638                   [3] [[] =] [pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] . ifte 2 swons 1 swons
1639             [3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] [[3]] [[] =] . infra first choice i 2 swons 1 swons
1640                                                                                                              [3] . [] = [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [3]] swaack first choice i 2 swons 1 swons
1641                                                                                                           [3] [] . = [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [3]] swaack first choice i 2 swons 1 swons
1642                                                                                                            False . [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [3]] swaack first choice i 2 swons 1 swons
1643                  False [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [3]] . swaack first choice i 2 swons 1 swons
1644                  [3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 2 swons 1 swons
1645                    [3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] False . choice i 2 swons 1 swons
1646                                   [3] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] . i 2 swons 1 swons
1647                                                                                                              [3] . uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons 2 swons 1 swons
1648                                                                                                             3 [] . swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons 2 swons 1 swons
1649                                                                                                             [] 3 . [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons 2 swons 1 swons
1650                                                          [] 3 [[[] =] [pop []] [uncons swap] [dip swons] genrec] . dip swons 2 swons 1 swons
1651                                                                                                               [] . [[] =] [pop []] [uncons swap] [dip swons] genrec 3 swons 2 swons 1 swons
1652                                                                                                        [] [[] =] . [pop []] [uncons swap] [dip swons] genrec 3 swons 2 swons 1 swons
1653                                                                                               [] [[] =] [pop []] . [uncons swap] [dip swons] genrec 3 swons 2 swons 1 swons
1654                                                                                 [] [[] =] [pop []] [uncons swap] . [dip swons] genrec 3 swons 2 swons 1 swons
1655                                                                     [] [[] =] [pop []] [uncons swap] [dip swons] . genrec 3 swons 2 swons 1 swons
1656                    [] [[] =] [pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] . ifte 3 swons 2 swons 1 swons
1657               [] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] [[]] [[] =] . infra first choice i 3 swons 2 swons 1 swons
1658                                                                                                               [] . [] = [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] []] swaack first choice i 3 swons 2 swons 1 swons
1659                                                                                                            [] [] . = [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] []] swaack first choice i 3 swons 2 swons 1 swons
1660                                                                                                             True . [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] []] swaack first choice i 3 swons 2 swons 1 swons
1661                    True [[pop []] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] []] . swaack first choice i 3 swons 2 swons 1 swons
1662                    [] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] [True] . first choice i 3 swons 2 swons 1 swons
1663                      [] [uncons swap [[[] =] [pop []] [uncons swap] [dip swons] genrec] dip swons] [pop []] True . choice i 3 swons 2 swons 1 swons
1664                                                                                                      [] [pop []] . i 3 swons 2 swons 1 swons
1665                                                                                                               [] . pop [] 3 swons 2 swons 1 swons
1666                                                                                                                  . [] 3 swons 2 swons 1 swons
1667                                                                                                               [] . 3 swons 2 swons 1 swons
1668                                                                                                             [] 3 . swons 2 swons 1 swons
1669                                                                                                             [] 3 . swap cons 2 swons 1 swons
1670                                                                                                             3 [] . cons 2 swons 1 swons
1671                                                                                                              [3] . 2 swons 1 swons
1672                                                                                                            [3] 2 . swons 1 swons
1673                                                                                                            [3] 2 . swap cons 1 swons
1674                                                                                                            2 [3] . cons 1 swons
1675                                                                                                            [2 3] . 1 swons
1676                                                                                                          [2 3] 1 . swons
1677                                                                                                          [2 3] 1 . swap cons
1678                                                                                                          1 [2 3] . cons
1679                                                                                                          [1 2 3] . 
1680
1681
1682
1683 ```python
1684 V('3 [P] [pop c] [Ga] [dip F] genrec')
1685 ```
1686
1687                                                                    . 3 [P] [pop c] [Ga] [dip F] genrec
1688                                                                  3 . [P] [pop c] [Ga] [dip F] genrec
1689                                                              3 [P] . [pop c] [Ga] [dip F] genrec
1690                                                      3 [P] [pop c] . [Ga] [dip F] genrec
1691                                                 3 [P] [pop c] [Ga] . [dip F] genrec
1692                                         3 [P] [pop c] [Ga] [dip F] . genrec
1693         3 [P] [pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] . ifte
1694     3 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] [3] [P] . infra first choice i
1695                                                                  3 . P [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 3] swaack first choice i
1696                                                                  3 . 1 <= [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 3] swaack first choice i
1697                                                                3 1 . <= [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 3] swaack first choice i
1698                                                              False . [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 3] swaack first choice i
1699     False [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 3] . swaack first choice i
1700     3 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] [False] . first choice i
1701       3 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] False . choice i
1702                     3 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] . i
1703                                                                  3 . Ga [[P] [pop c] [Ga] [dip F] genrec] dip F
1704                                                                  3 . -- dup [[P] [pop c] [Ga] [dip F] genrec] dip F
1705                                                                  2 . dup [[P] [pop c] [Ga] [dip F] genrec] dip F
1706                                                                2 2 . [[P] [pop c] [Ga] [dip F] genrec] dip F
1707                              2 2 [[P] [pop c] [Ga] [dip F] genrec] . dip F
1708                                                                  2 . [P] [pop c] [Ga] [dip F] genrec 2 F
1709                                                              2 [P] . [pop c] [Ga] [dip F] genrec 2 F
1710                                                      2 [P] [pop c] . [Ga] [dip F] genrec 2 F
1711                                                 2 [P] [pop c] [Ga] . [dip F] genrec 2 F
1712                                         2 [P] [pop c] [Ga] [dip F] . genrec 2 F
1713         2 [P] [pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] . ifte 2 F
1714     2 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] [2] [P] . infra first choice i 2 F
1715                                                                  2 . P [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 2] swaack first choice i 2 F
1716                                                                  2 . 1 <= [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 2] swaack first choice i 2 F
1717                                                                2 1 . <= [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 2] swaack first choice i 2 F
1718                                                              False . [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 2] swaack first choice i 2 F
1719     False [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 2] . swaack first choice i 2 F
1720     2 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] [False] . first choice i 2 F
1721       2 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] False . choice i 2 F
1722                     2 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] . i 2 F
1723                                                                  2 . Ga [[P] [pop c] [Ga] [dip F] genrec] dip F 2 F
1724                                                                  2 . -- dup [[P] [pop c] [Ga] [dip F] genrec] dip F 2 F
1725                                                                  1 . dup [[P] [pop c] [Ga] [dip F] genrec] dip F 2 F
1726                                                                1 1 . [[P] [pop c] [Ga] [dip F] genrec] dip F 2 F
1727                              1 1 [[P] [pop c] [Ga] [dip F] genrec] . dip F 2 F
1728                                                                  1 . [P] [pop c] [Ga] [dip F] genrec 1 F 2 F
1729                                                              1 [P] . [pop c] [Ga] [dip F] genrec 1 F 2 F
1730                                                      1 [P] [pop c] . [Ga] [dip F] genrec 1 F 2 F
1731                                                 1 [P] [pop c] [Ga] . [dip F] genrec 1 F 2 F
1732                                         1 [P] [pop c] [Ga] [dip F] . genrec 1 F 2 F
1733         1 [P] [pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] . ifte 1 F 2 F
1734     1 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] [1] [P] . infra first choice i 1 F 2 F
1735                                                                  1 . P [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 1] swaack first choice i 1 F 2 F
1736                                                                  1 . 1 <= [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 1] swaack first choice i 1 F 2 F
1737                                                                1 1 . <= [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 1] swaack first choice i 1 F 2 F
1738                                                               True . [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 1] swaack first choice i 1 F 2 F
1739      True [[pop c] [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] 1] . swaack first choice i 1 F 2 F
1740      1 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] [True] . first choice i 1 F 2 F
1741        1 [Ga [[P] [pop c] [Ga] [dip F] genrec] dip F] [pop c] True . choice i 1 F 2 F
1742                                                          1 [pop c] . i 1 F 2 F
1743                                                                  1 . pop c 1 F 2 F
1744                                                                    . c 1 F 2 F
1745                                                                    . 0 1 F 2 F
1746                                                                  0 . 1 F 2 F
1747                                                                0 1 . F 2 F
1748                                                                0 1 . + 2 F
1749                                                                  1 . 2 F
1750                                                                1 2 . F
1751                                                                1 2 . +
1752                                                                  3 . 
1753
1754
1755
1756 ```python
1757 V('3 [P] [pop []] [Ga] [dip swons] genrec')
1758 ```
1759
1760                                                                              . 3 [P] [pop []] [Ga] [dip swons] genrec
1761                                                                            3 . [P] [pop []] [Ga] [dip swons] genrec
1762                                                                        3 [P] . [pop []] [Ga] [dip swons] genrec
1763                                                               3 [P] [pop []] . [Ga] [dip swons] genrec
1764                                                          3 [P] [pop []] [Ga] . [dip swons] genrec
1765                                              3 [P] [pop []] [Ga] [dip swons] . genrec
1766         3 [P] [pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] . ifte
1767     3 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] [3] [P] . infra first choice i
1768                                                                            3 . P [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 3] swaack first choice i
1769                                                                            3 . 1 <= [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 3] swaack first choice i
1770                                                                          3 1 . <= [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 3] swaack first choice i
1771                                                                        False . [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 3] swaack first choice i
1772     False [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 3] . swaack first choice i
1773     3 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] [False] . first choice i
1774       3 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] False . choice i
1775                      3 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] . i
1776                                                                            3 . Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons
1777                                                                            3 . -- dup [[P] [pop []] [Ga] [dip swons] genrec] dip swons
1778                                                                            2 . dup [[P] [pop []] [Ga] [dip swons] genrec] dip swons
1779                                                                          2 2 . [[P] [pop []] [Ga] [dip swons] genrec] dip swons
1780                                   2 2 [[P] [pop []] [Ga] [dip swons] genrec] . dip swons
1781                                                                            2 . [P] [pop []] [Ga] [dip swons] genrec 2 swons
1782                                                                        2 [P] . [pop []] [Ga] [dip swons] genrec 2 swons
1783                                                               2 [P] [pop []] . [Ga] [dip swons] genrec 2 swons
1784                                                          2 [P] [pop []] [Ga] . [dip swons] genrec 2 swons
1785                                              2 [P] [pop []] [Ga] [dip swons] . genrec 2 swons
1786         2 [P] [pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] . ifte 2 swons
1787     2 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] [2] [P] . infra first choice i 2 swons
1788                                                                            2 . P [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 2] swaack first choice i 2 swons
1789                                                                            2 . 1 <= [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 2] swaack first choice i 2 swons
1790                                                                          2 1 . <= [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 2] swaack first choice i 2 swons
1791                                                                        False . [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 2] swaack first choice i 2 swons
1792     False [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 2] . swaack first choice i 2 swons
1793     2 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] [False] . first choice i 2 swons
1794       2 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] False . choice i 2 swons
1795                      2 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] . i 2 swons
1796                                                                            2 . Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons 2 swons
1797                                                                            2 . -- dup [[P] [pop []] [Ga] [dip swons] genrec] dip swons 2 swons
1798                                                                            1 . dup [[P] [pop []] [Ga] [dip swons] genrec] dip swons 2 swons
1799                                                                          1 1 . [[P] [pop []] [Ga] [dip swons] genrec] dip swons 2 swons
1800                                   1 1 [[P] [pop []] [Ga] [dip swons] genrec] . dip swons 2 swons
1801                                                                            1 . [P] [pop []] [Ga] [dip swons] genrec 1 swons 2 swons
1802                                                                        1 [P] . [pop []] [Ga] [dip swons] genrec 1 swons 2 swons
1803                                                               1 [P] [pop []] . [Ga] [dip swons] genrec 1 swons 2 swons
1804                                                          1 [P] [pop []] [Ga] . [dip swons] genrec 1 swons 2 swons
1805                                              1 [P] [pop []] [Ga] [dip swons] . genrec 1 swons 2 swons
1806         1 [P] [pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] . ifte 1 swons 2 swons
1807     1 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] [1] [P] . infra first choice i 1 swons 2 swons
1808                                                                            1 . P [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 1] swaack first choice i 1 swons 2 swons
1809                                                                            1 . 1 <= [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 1] swaack first choice i 1 swons 2 swons
1810                                                                          1 1 . <= [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 1] swaack first choice i 1 swons 2 swons
1811                                                                         True . [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 1] swaack first choice i 1 swons 2 swons
1812      True [[pop []] [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] 1] . swaack first choice i 1 swons 2 swons
1813      1 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] [True] . first choice i 1 swons 2 swons
1814        1 [Ga [[P] [pop []] [Ga] [dip swons] genrec] dip swons] [pop []] True . choice i 1 swons 2 swons
1815                                                                   1 [pop []] . i 1 swons 2 swons
1816                                                                            1 . pop [] 1 swons 2 swons
1817                                                                              . [] 1 swons 2 swons
1818                                                                           [] . 1 swons 2 swons
1819                                                                         [] 1 . swons 2 swons
1820                                                                         [] 1 . swap cons 2 swons
1821                                                                         1 [] . cons 2 swons
1822                                                                          [1] . 2 swons
1823                                                                        [1] 2 . swons
1824                                                                        [1] 2 . swap cons
1825                                                                        2 [1] . cons
1826                                                                        [2 1] . 
1827
1828
1829
1830 ```python
1831 V('[2 1] [[] =] [pop c ] [uncons swap] [dip F] genrec')
1832 ```
1833
1834                                                                                                    . [2 1] [[] =] [pop c] [uncons swap] [dip F] genrec
1835                                                                                              [2 1] . [[] =] [pop c] [uncons swap] [dip F] genrec
1836                                                                                       [2 1] [[] =] . [pop c] [uncons swap] [dip F] genrec
1837                                                                               [2 1] [[] =] [pop c] . [uncons swap] [dip F] genrec
1838                                                                 [2 1] [[] =] [pop c] [uncons swap] . [dip F] genrec
1839                                                         [2 1] [[] =] [pop c] [uncons swap] [dip F] . genrec
1840             [2 1] [[] =] [pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] . ifte
1841     [2 1] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] [[2 1]] [[] =] . infra first choice i
1842                                                                                              [2 1] . [] = [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [2 1]] swaack first choice i
1843                                                                                           [2 1] [] . = [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [2 1]] swaack first choice i
1844                                                                                              False . [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [2 1]] swaack first choice i
1845            False [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [2 1]] . swaack first choice i
1846            [2 1] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] [False] . first choice i
1847              [2 1] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] False . choice i
1848                            [2 1] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] . i
1849                                                                                              [2 1] . uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F
1850                                                                                              2 [1] . swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F
1851                                                                                              [1] 2 . [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F
1852                                                [1] 2 [[[] =] [pop c] [uncons swap] [dip F] genrec] . dip F
1853                                                                                                [1] . [[] =] [pop c] [uncons swap] [dip F] genrec 2 F
1854                                                                                         [1] [[] =] . [pop c] [uncons swap] [dip F] genrec 2 F
1855                                                                                 [1] [[] =] [pop c] . [uncons swap] [dip F] genrec 2 F
1856                                                                   [1] [[] =] [pop c] [uncons swap] . [dip F] genrec 2 F
1857                                                           [1] [[] =] [pop c] [uncons swap] [dip F] . genrec 2 F
1858               [1] [[] =] [pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] . ifte 2 F
1859         [1] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] [[1]] [[] =] . infra first choice i 2 F
1860                                                                                                [1] . [] = [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [1]] swaack first choice i 2 F
1861                                                                                             [1] [] . = [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [1]] swaack first choice i 2 F
1862                                                                                              False . [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [1]] swaack first choice i 2 F
1863              False [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [1]] . swaack first choice i 2 F
1864              [1] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] [False] . first choice i 2 F
1865                [1] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] False . choice i 2 F
1866                              [1] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] . i 2 F
1867                                                                                                [1] . uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F 2 F
1868                                                                                               1 [] . swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F 2 F
1869                                                                                               [] 1 . [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F 2 F
1870                                                 [] 1 [[[] =] [pop c] [uncons swap] [dip F] genrec] . dip F 2 F
1871                                                                                                 [] . [[] =] [pop c] [uncons swap] [dip F] genrec 1 F 2 F
1872                                                                                          [] [[] =] . [pop c] [uncons swap] [dip F] genrec 1 F 2 F
1873                                                                                  [] [[] =] [pop c] . [uncons swap] [dip F] genrec 1 F 2 F
1874                                                                    [] [[] =] [pop c] [uncons swap] . [dip F] genrec 1 F 2 F
1875                                                            [] [[] =] [pop c] [uncons swap] [dip F] . genrec 1 F 2 F
1876                [] [[] =] [pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] . ifte 1 F 2 F
1877           [] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] [[]] [[] =] . infra first choice i 1 F 2 F
1878                                                                                                 [] . [] = [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] []] swaack first choice i 1 F 2 F
1879                                                                                              [] [] . = [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] []] swaack first choice i 1 F 2 F
1880                                                                                               True . [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] []] swaack first choice i 1 F 2 F
1881                True [[pop c] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] []] . swaack first choice i 1 F 2 F
1882                [] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] [True] . first choice i 1 F 2 F
1883                  [] [uncons swap [[[] =] [pop c] [uncons swap] [dip F] genrec] dip F] [pop c] True . choice i 1 F 2 F
1884                                                                                         [] [pop c] . i 1 F 2 F
1885                                                                                                 [] . pop c 1 F 2 F
1886                                                                                                    . c 1 F 2 F
1887                                                                                                    . 0 1 F 2 F
1888                                                                                                  0 . 1 F 2 F
1889                                                                                                0 1 . F 2 F
1890                                                                                                0 1 . + 2 F
1891                                                                                                  1 . 2 F
1892                                                                                                1 2 . F
1893                                                                                                1 2 . +
1894                                                                                                  3 . 
1895
1896
1897 ## Appendix - Fun with Symbols
1898
1899     |[ (c, F), (G, P) ]| == (|c, F|) • [(G, P)]
1900
1901 ["Bananas, Lenses, & Barbed Wire"](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.125)
1902
1903     (|...|)  [(...)]  [<...>]
1904
1905 I think they are having slightly too much fun with the symbols.
1906
1907 "Too much is always better than not enough."