• R/O
  • SSH

Joypy: Commit

This repo is not current. Development has moved from Hg to Git. For the latest code use the "Source Code" tab above to go to the "Thun" git repo or navigate to:
https://osdn.net/projects/joypy/scm/git/Thun


Commit MetaInfo

Révisionab34fee54595f4d0e91b928ecd4c4d38840848e2 (tree)
l'heure2020-06-03 23:52:21
AuteurSimon Forman <sforman@hush...>
CommiterSimon Forman

Message de Log

Added a page to the docs.

Advent_of_Code_2017_December_1st a simple example.

Change Summary

Modification

diff -r 33cf8e5aec62 -r ab34fee54595 docs/Advent_of_Code_2017_December_1st.html
--- a/docs/Advent_of_Code_2017_December_1st.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/Advent_of_Code_2017_December_1st.html Wed Jun 03 07:52:21 2020 -0700
@@ -13077,7 +13077,9 @@
1307713077 <div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
1307813078 </div><div class="inner_cell">
1307913079 <div class="text_cell_render border-box-sizing rendered_html">
13080-<h1 id="Advent-of-Code-2017">Advent of Code 2017<a class="anchor-link" href="#Advent-of-Code-2017">&#182;</a></h1><h2 id="December-1st">December 1st<a class="anchor-link" href="#December-1st">&#182;</a></h2><p>[Given] a sequence of digits (your puzzle input) and find the sum of all digits that match the next digit in the list. The list is circular, so the digit after the last digit is the first digit in the list.</p>
13080+<h1 id="Joy-Example-Code">Joy Example Code<a class="anchor-link" href="#Joy-Example-Code">&#182;</a></h1><p>A brief example of Joy programming from the <a href="https://adventofcode.com/2017/day/1">Advent of Code 2017, December 1st puzzle</a>.</p>
13081+<blockquote><p>Given a sequence of digits (your puzzle input) and find the sum of all digits that match the next digit in the list. The list is circular, so the digit after the last digit is the first digit in the list.</p>
13082+</blockquote>
1308113083 <p>For example:</p>
1308213084 <ul>
1308313085 <li>1122 produces a sum of 3 (1 + 2) because the first digit (1) matches the second digit and the third digit (2) matches the fourth digit.</li>
@@ -13094,7 +13096,7 @@
1309413096 <div class="prompt input_prompt">In&nbsp;[1]:</div>
1309513097 <div class="inner_cell">
1309613098 <div class="input_area">
13097-<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">from</span> <span class="nn">notebook_preamble</span> <span class="kn">import</span> <span class="n">J</span><span class="p">,</span> <span class="n">V</span><span class="p">,</span> <span class="n">define</span>
13099+<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">from</span> <span class="nn">notebook_preamble</span> <span class="kn">import</span> <span class="n">J</span><span class="p">,</span> <span class="n">V</span><span class="p">,</span> <span class="n">define</span>
1309813100 </pre></div>
1309913101
1310013102 </div>
@@ -13139,7 +13141,7 @@
1313913141 <div class="prompt input_prompt">In&nbsp;[2]:</div>
1314013142 <div class="inner_cell">
1314113143 <div class="input_area">
13142-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">define</span><span class="p">(</span><span class="s1">&#39;pair_up == dup uncons swap unit concat zip&#39;</span><span class="p">)</span>
13144+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">define</span><span class="p">(</span><span class="s1">&#39;pair_up dup uncons swap unit concat zip&#39;</span><span class="p">)</span>
1314313145 </pre></div>
1314413146
1314513147 </div>
@@ -13152,7 +13154,7 @@
1315213154 <div class="prompt input_prompt">In&nbsp;[3]:</div>
1315313155 <div class="inner_cell">
1315413156 <div class="input_area">
13155-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3] pair_up&#39;</span><span class="p">)</span>
13157+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3] pair_up&#39;</span><span class="p">)</span>
1315613158 </pre></div>
1315713159
1315813160 </div>
@@ -13183,7 +13185,7 @@
1318313185 <div class="prompt input_prompt">In&nbsp;[4]:</div>
1318413186 <div class="inner_cell">
1318513187 <div class="input_area">
13186-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 2 3] pair_up&#39;</span><span class="p">)</span>
13188+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 2 3] pair_up&#39;</span><span class="p">)</span>
1318713189 </pre></div>
1318813190
1318913191 </div>
@@ -13251,7 +13253,7 @@
1325113253 <div class="prompt input_prompt">In&nbsp;[5]:</div>
1325213254 <div class="inner_cell">
1325313255 <div class="input_area">
13254-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">define</span><span class="p">(</span><span class="s1">&#39;total_matches == 0 swap [i [=] [pop +] [popop] ifte] step&#39;</span><span class="p">)</span>
13256+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">define</span><span class="p">(</span><span class="s1">&#39;total_matches 0 swap [i [=] [pop +] [popop] ifte] step&#39;</span><span class="p">)</span>
1325513257 </pre></div>
1325613258
1325713259 </div>
@@ -13264,7 +13266,7 @@
1326413266 <div class="prompt input_prompt">In&nbsp;[6]:</div>
1326513267 <div class="inner_cell">
1326613268 <div class="input_area">
13267-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3] pair_up total_matches&#39;</span><span class="p">)</span>
13269+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3] pair_up total_matches&#39;</span><span class="p">)</span>
1326813270 </pre></div>
1326913271
1327013272 </div>
@@ -13295,7 +13297,7 @@
1329513297 <div class="prompt input_prompt">In&nbsp;[7]:</div>
1329613298 <div class="inner_cell">
1329713299 <div class="input_area">
13298-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 2 3] pair_up total_matches&#39;</span><span class="p">)</span>
13300+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 2 3] pair_up total_matches&#39;</span><span class="p">)</span>
1329913301 </pre></div>
1330013302
1330113303 </div>
@@ -13334,7 +13336,7 @@
1333413336 <div class="prompt input_prompt">In&nbsp;[8]:</div>
1333513337 <div class="inner_cell">
1333613338 <div class="input_area">
13337-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">define</span><span class="p">(</span><span class="s1">&#39;AoC2017.1 == pair_up total_matches&#39;</span><span class="p">)</span>
13339+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">define</span><span class="p">(</span><span class="s1">&#39;AoC2017.1 pair_up total_matches&#39;</span><span class="p">)</span>
1333813340 </pre></div>
1333913341
1334013342 </div>
@@ -13347,7 +13349,7 @@
1334713349 <div class="prompt input_prompt">In&nbsp;[9]:</div>
1334813350 <div class="inner_cell">
1334913351 <div class="input_area">
13350-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 1 2 2] AoC2017.1&#39;</span><span class="p">)</span>
13352+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 1 2 2] AoC2017.1&#39;</span><span class="p">)</span>
1335113353 </pre></div>
1335213354
1335313355 </div>
@@ -13378,7 +13380,7 @@
1337813380 <div class="prompt input_prompt">In&nbsp;[10]:</div>
1337913381 <div class="inner_cell">
1338013382 <div class="input_area">
13381-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 1 1 1] AoC2017.1&#39;</span><span class="p">)</span>
13383+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 1 1 1] AoC2017.1&#39;</span><span class="p">)</span>
1338213384 </pre></div>
1338313385
1338413386 </div>
@@ -13409,7 +13411,7 @@
1340913411 <div class="prompt input_prompt">In&nbsp;[11]:</div>
1341013412 <div class="inner_cell">
1341113413 <div class="input_area">
13412-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3 4] AoC2017.1&#39;</span><span class="p">)</span>
13414+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3 4] AoC2017.1&#39;</span><span class="p">)</span>
1341313415 </pre></div>
1341413416
1341513417 </div>
@@ -13440,38 +13442,7 @@
1344013442 <div class="prompt input_prompt">In&nbsp;[12]:</div>
1344113443 <div class="inner_cell">
1344213444 <div class="input_area">
13443-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[9 1 2 1 2 1 2 9] AoC2017.1&#39;</span><span class="p">)</span>
13444-</pre></div>
13445-
13446- </div>
13447-</div>
13448-</div>
13449-
13450-<div class="output_wrapper">
13451-<div class="output">
13452-
13453-
13454-<div class="output_area">
13455-
13456- <div class="prompt"></div>
13457-
13458-
13459-<div class="output_subarea output_stream output_stdout output_text">
13460-<pre>9
13461-</pre>
13462-</div>
13463-</div>
13464-
13465-</div>
13466-</div>
13467-
13468-</div>
13469-<div class="cell border-box-sizing code_cell rendered">
13470-<div class="input">
13471-<div class="prompt input_prompt">In&nbsp;[13]:</div>
13472-<div class="inner_cell">
13473- <div class="input_area">
13474-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[9 1 2 1 2 1 2 9] AoC2017.1&#39;</span><span class="p">)</span>
13445+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[9 1 2 1 2 1 2 9] AoC2017.1&#39;</span><span class="p">)</span>
1347513446 </pre></div>
1347613447
1347713448 </div>
@@ -13509,18 +13480,12 @@
1350913480 </div>
1351013481 </div>
1351113482 </div>
13512-<div class="cell border-box-sizing code_cell rendered">
13513-<div class="input">
13514-<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
13515-<div class="inner_cell">
13516- <div class="input_area">
13517-<div class=" highlight hl-ipython2"><pre><span></span>
13518-</pre></div>
13519-
13520- </div>
13521-</div>
13522-</div>
13523-
13483+<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
13484+</div><div class="inner_cell">
13485+<div class="text_cell_render border-box-sizing rendered_html">
13486+<h2 id="Next-Part-of-the-Challenge">Next Part of the Challenge<a class="anchor-link" href="#Next-Part-of-the-Challenge">&#182;</a></h2>
13487+</div>
13488+</div>
1352413489 </div>
1352513490 <div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
1352613491 </div><div class="inner_cell">
@@ -13534,10 +13499,10 @@
1353413499 </div>
1353513500 <div class="cell border-box-sizing code_cell rendered">
1353613501 <div class="input">
13537-<div class="prompt input_prompt">In&nbsp;[14]:</div>
13502+<div class="prompt input_prompt">In&nbsp;[13]:</div>
1353813503 <div class="inner_cell">
1353913504 <div class="input_area">
13540-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3 4] dup size 2 / [drop] [take reverse] cleave concat zip&#39;</span><span class="p">)</span>
13505+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3 4] dup size 2 / [drop] [take reverse] cleave concat zip&#39;</span><span class="p">)</span>
1354113506 </pre></div>
1354213507
1354313508 </div>
@@ -13573,10 +13538,10 @@
1357313538 </div>
1357413539 <div class="cell border-box-sizing code_cell rendered">
1357513540 <div class="input">
13576-<div class="prompt input_prompt">In&nbsp;[15]:</div>
13541+<div class="prompt input_prompt">In&nbsp;[14]:</div>
1357713542 <div class="inner_cell">
1357813543 <div class="input_area">
13579-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3 4] dup size 2 / [drop] [take reverse] cleave zip&#39;</span><span class="p">)</span>
13544+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3 4] dup size 2 / [drop] [take reverse] cleave zip&#39;</span><span class="p">)</span>
1358013545 </pre></div>
1358113546
1358213547 </div>
@@ -13604,10 +13569,10 @@
1360413569 </div>
1360513570 <div class="cell border-box-sizing code_cell rendered">
1360613571 <div class="input">
13607-<div class="prompt input_prompt">In&nbsp;[16]:</div>
13572+<div class="prompt input_prompt">In&nbsp;[15]:</div>
1360813573 <div class="inner_cell">
1360913574 <div class="input_area">
13610-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">define</span><span class="p">(</span><span class="s1">&#39;AoC2017.1.extra == dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *&#39;</span><span class="p">)</span>
13575+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">define</span><span class="p">(</span><span class="s1">&#39;AoC2017.1.extra dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *&#39;</span><span class="p">)</span>
1361113576 </pre></div>
1361213577
1361313578 </div>
@@ -13617,10 +13582,10 @@
1361713582 </div>
1361813583 <div class="cell border-box-sizing code_cell rendered">
1361913584 <div class="input">
13620-<div class="prompt input_prompt">In&nbsp;[17]:</div>
13585+<div class="prompt input_prompt">In&nbsp;[16]:</div>
1362113586 <div class="inner_cell">
1362213587 <div class="input_area">
13623-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 1 2] AoC2017.1.extra&#39;</span><span class="p">)</span>
13588+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 1 2] AoC2017.1.extra&#39;</span><span class="p">)</span>
1362413589 </pre></div>
1362513590
1362613591 </div>
@@ -13648,10 +13613,10 @@
1364813613 </div>
1364913614 <div class="cell border-box-sizing code_cell rendered">
1365013615 <div class="input">
13651-<div class="prompt input_prompt">In&nbsp;[18]:</div>
13616+<div class="prompt input_prompt">In&nbsp;[17]:</div>
1365213617 <div class="inner_cell">
1365313618 <div class="input_area">
13654-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 2 1] AoC2017.1.extra&#39;</span><span class="p">)</span>
13619+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 2 1] AoC2017.1.extra&#39;</span><span class="p">)</span>
1365513620 </pre></div>
1365613621
1365713622 </div>
@@ -13679,10 +13644,10 @@
1367913644 </div>
1368013645 <div class="cell border-box-sizing code_cell rendered">
1368113646 <div class="input">
13682-<div class="prompt input_prompt">In&nbsp;[19]:</div>
13647+<div class="prompt input_prompt">In&nbsp;[18]:</div>
1368313648 <div class="inner_cell">
1368413649 <div class="input_area">
13685-<div class=" highlight hl-ipython2"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3 4 2 5] AoC2017.1.extra&#39;</span><span class="p">)</span>
13650+<div class=" highlight hl-ipython3"><pre><span></span><span class="n">J</span><span class="p">(</span><span class="s1">&#39;[1 2 3 4 2 5] AoC2017.1.extra&#39;</span><span class="p">)</span>
1368613651 </pre></div>
1368713652
1368813653 </div>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/Advent_of_Code_2017_December_1st.ipynb
--- a/docs/Advent_of_Code_2017_December_1st.ipynb Sat May 30 23:39:16 2020 -0700
+++ b/docs/Advent_of_Code_2017_December_1st.ipynb Wed Jun 03 07:52:21 2020 -0700
@@ -4,11 +4,11 @@
44 "cell_type": "markdown",
55 "metadata": {},
66 "source": [
7- "# Advent of Code 2017\n",
7+ "# Joy Example Code\n",
88 "\n",
9- "## December 1st\n",
9+ "A brief example of Joy programming from the [Advent of Code 2017, December 1st puzzle](https://adventofcode.com/2017/day/1).\n",
1010 "\n",
11- "\\[Given\\] a sequence of digits (your puzzle input) and find the sum of all digits that match the next digit in the list. The list is circular, so the digit after the last digit is the first digit in the list.\n",
11+ "> Given a sequence of digits (your puzzle input) and find the sum of all digits that match the next digit in the list. The list is circular, so the digit after the last digit is the first digit in the list.\n",
1212 "\n",
1313 "For example:\n",
1414 "\n",
@@ -63,7 +63,7 @@
6363 "metadata": {},
6464 "outputs": [],
6565 "source": [
66- "define('pair_up == dup uncons swap unit concat zip')"
66+ "define('pair_up dup uncons swap unit concat zip')"
6767 ]
6868 },
6969 {
@@ -139,7 +139,7 @@
139139 "metadata": {},
140140 "outputs": [],
141141 "source": [
142- "define('total_matches == 0 swap [i [=] [pop +] [popop] ifte] step')"
142+ "define('total_matches 0 swap [i [=] [pop +] [popop] ifte] step')"
143143 ]
144144 },
145145 {
@@ -189,7 +189,7 @@
189189 "metadata": {},
190190 "outputs": [],
191191 "source": [
192- "define('AoC2017.1 == pair_up total_matches')"
192+ "define('AoC2017.1 pair_up total_matches')"
193193 ]
194194 },
195195 {
@@ -263,25 +263,6 @@
263263 ]
264264 },
265265 {
266- "cell_type": "code",
267- "execution_count": 13,
268- "metadata": {
269- "scrolled": false
270- },
271- "outputs": [
272- {
273- "name": "stdout",
274- "output_type": "stream",
275- "text": [
276- "9\n"
277- ]
278- }
279- ],
280- "source": [
281- "J('[9 1 2 1 2 1 2 9] AoC2017.1')"
282- ]
283- },
284- {
285266 "cell_type": "markdown",
286267 "metadata": {},
287268 "source": [
@@ -292,11 +273,11 @@
292273 ]
293274 },
294275 {
295- "cell_type": "code",
296- "execution_count": null,
276+ "cell_type": "markdown",
297277 "metadata": {},
298- "outputs": [],
299- "source": []
278+ "source": [
279+ "## Next Part of the Challenge"
280+ ]
300281 },
301282 {
302283 "cell_type": "markdown",
@@ -309,7 +290,7 @@
309290 },
310291 {
311292 "cell_type": "code",
312- "execution_count": 14,
293+ "execution_count": 13,
313294 "metadata": {},
314295 "outputs": [
315296 {
@@ -333,7 +314,7 @@
333314 },
334315 {
335316 "cell_type": "code",
336- "execution_count": 15,
317+ "execution_count": 14,
337318 "metadata": {},
338319 "outputs": [
339320 {
@@ -350,16 +331,16 @@
350331 },
351332 {
352333 "cell_type": "code",
353- "execution_count": 16,
334+ "execution_count": 15,
354335 "metadata": {},
355336 "outputs": [],
356337 "source": [
357- "define('AoC2017.1.extra == dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *')"
338+ "define('AoC2017.1.extra dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *')"
358339 ]
359340 },
360341 {
361342 "cell_type": "code",
362- "execution_count": 17,
343+ "execution_count": 16,
363344 "metadata": {},
364345 "outputs": [
365346 {
@@ -376,7 +357,7 @@
376357 },
377358 {
378359 "cell_type": "code",
379- "execution_count": 18,
360+ "execution_count": 17,
380361 "metadata": {},
381362 "outputs": [
382363 {
@@ -393,7 +374,7 @@
393374 },
394375 {
395376 "cell_type": "code",
396- "execution_count": 19,
377+ "execution_count": 18,
397378 "metadata": {},
398379 "outputs": [
399380 {
@@ -440,14 +421,14 @@
440421 "language_info": {
441422 "codemirror_mode": {
442423 "name": "ipython",
443- "version": 2
424+ "version": 3
444425 },
445426 "file_extension": ".py",
446427 "mimetype": "text/x-python",
447428 "name": "python",
448429 "nbconvert_exporter": "python",
449- "pygments_lexer": "ipython2",
450- "version": "2.7.13"
430+ "pygments_lexer": "ipython3",
431+ "version": "3.8.3"
451432 }
452433 },
453434 "nbformat": 4,
diff -r 33cf8e5aec62 -r ab34fee54595 docs/Advent_of_Code_2017_December_1st.md
--- a/docs/Advent_of_Code_2017_December_1st.md Sat May 30 23:39:16 2020 -0700
+++ b/docs/Advent_of_Code_2017_December_1st.md Wed Jun 03 07:52:21 2020 -0700
@@ -1,8 +1,8 @@
1-# Advent of Code 2017
1+# Joy Example Code
22
3-## December 1st
3+A brief example of Joy programming from the [Advent of Code 2017, December 1st puzzle](https://adventofcode.com/2017/day/1).
44
5-\[Given\] a sequence of digits (your puzzle input) and find the sum of all digits that match the next digit in the list. The list is circular, so the digit after the last digit is the first digit in the list.
5+> Given a sequence of digits (your puzzle input) and find the sum of all digits that match the next digit in the list. The list is circular, so the digit after the last digit is the first digit in the list.
66
77 For example:
88
@@ -39,7 +39,7 @@
3939
4040
4141 ```python
42-define('pair_up == dup uncons swap unit concat zip')
42+define('pair_up dup uncons swap unit concat zip')
4343 ```
4444
4545
@@ -86,7 +86,7 @@
8686
8787
8888 ```python
89-define('total_matches == 0 swap [i [=] [pop +] [popop] ifte] step')
89+define('total_matches 0 swap [i [=] [pop +] [popop] ifte] step')
9090 ```
9191
9292
@@ -109,7 +109,7 @@
109109
110110
111111 ```python
112-define('AoC2017.1 == pair_up total_matches')
112+define('AoC2017.1 pair_up total_matches')
113113 ```
114114
115115
@@ -144,23 +144,12 @@
144144 9
145145
146146
147-
148-```python
149-J('[9 1 2 1 2 1 2 9] AoC2017.1')
150-```
151-
152- 9
153-
154-
155147 pair_up == dup uncons swap unit concat zip
156148 total_matches == 0 swap [i [=] [pop +] [popop] ifte] step
157149
158150 AoC2017.1 == pair_up total_matches
159151
160-
161-```python
162-
163-```
152+## Next Part of the Challenge
164153
165154 Now the paired digit is "halfway" round.
166155
@@ -186,7 +175,7 @@
186175
187176
188177 ```python
189-define('AoC2017.1.extra == dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *')
178+define('AoC2017.1.extra dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *')
190179 ```
191180
192181
diff -r 33cf8e5aec62 -r ab34fee54595 docs/Advent_of_Code_2017_December_1st.rst
--- a/docs/Advent_of_Code_2017_December_1st.rst Sat May 30 23:39:16 2020 -0700
+++ b/docs/Advent_of_Code_2017_December_1st.rst Wed Jun 03 07:52:21 2020 -0700
@@ -1,12 +1,13 @@
1-Advent of Code 2017
2-===================
1+Joy Example Code
2+================
33
4-December 1st
5-------------
4+A brief example of Joy programming from the `Advent of Code 2017,
5+December 1st puzzle <https://adventofcode.com/2017/day/1>`__.
66
7-[Given] a sequence of digits (your puzzle input) and find the sum of all
8-digits that match the next digit in the list. The list is circular, so
9-the digit after the last digit is the first digit in the list.
7+ Given a sequence of digits (your puzzle input) and find the sum of
8+ all digits that match the next digit in the list. The list is
9+ circular, so the digit after the last digit is the first digit in
10+ the list.
1011
1112 For example:
1213
@@ -17,7 +18,7 @@
1718 - 91212129 produces 9 because the only digit that matches the next one
1819 is the last digit, 9.
1920
20-.. code:: ipython2
21+.. code:: ipython3
2122
2223 from notebook_preamble import J, V, define
2324
@@ -52,11 +53,11 @@
5253 [a b c] [b c a] zip
5354 [[b a] [c b] [a c]]
5455
55-.. code:: ipython2
56+.. code:: ipython3
5657
57- define('pair_up == dup uncons swap unit concat zip')
58+ define('pair_up dup uncons swap unit concat zip')
5859
59-.. code:: ipython2
60+.. code:: ipython3
6061
6162 J('[1 2 3] pair_up')
6263
@@ -66,7 +67,7 @@
6667 [[2 1] [3 2] [1 3]]
6768
6869
69-.. code:: ipython2
70+.. code:: ipython3
7071
7172 J('[1 2 2 3] pair_up')
7273
@@ -115,11 +116,11 @@
115116
116117 total_matches == 0 swap [i [=] [pop +] [popop] ifte] step
117118
118-.. code:: ipython2
119+.. code:: ipython3
119120
120- define('total_matches == 0 swap [i [=] [pop +] [popop] ifte] step')
121+ define('total_matches 0 swap [i [=] [pop +] [popop] ifte] step')
121122
122-.. code:: ipython2
123+.. code:: ipython3
123124
124125 J('[1 2 3] pair_up total_matches')
125126
@@ -129,7 +130,7 @@
129130 0
130131
131132
132-.. code:: ipython2
133+.. code:: ipython3
133134
134135 J('[1 2 2 3] pair_up total_matches')
135136
@@ -141,11 +142,11 @@
141142
142143 Now we can define our main program and evaluate it on the examples.
143144
144-.. code:: ipython2
145+.. code:: ipython3
145146
146- define('AoC2017.1 == pair_up total_matches')
147+ define('AoC2017.1 pair_up total_matches')
147148
148-.. code:: ipython2
149+.. code:: ipython3
149150
150151 J('[1 1 2 2] AoC2017.1')
151152
@@ -155,7 +156,7 @@
155156 3
156157
157158
158-.. code:: ipython2
159+.. code:: ipython3
159160
160161 J('[1 1 1 1] AoC2017.1')
161162
@@ -165,7 +166,7 @@
165166 4
166167
167168
168-.. code:: ipython2
169+.. code:: ipython3
169170
170171 J('[1 2 3 4] AoC2017.1')
171172
@@ -175,17 +176,7 @@
175176 0
176177
177178
178-.. code:: ipython2
179-
180- J('[9 1 2 1 2 1 2 9] AoC2017.1')
181-
182-
183-.. parsed-literal::
184-
185- 9
186-
187-
188-.. code:: ipython2
179+.. code:: ipython3
189180
190181 J('[9 1 2 1 2 1 2 9] AoC2017.1')
191182
@@ -202,6 +193,8 @@
202193
203194 AoC2017.1 == pair_up total_matches
204195
196+Next Part of the Challenge
197+--------------------------
205198
206199 Now the paired digit is "halfway" round.
207200
@@ -209,7 +202,7 @@
209202
210203 [a b c d] dup size 2 / [drop] [take reverse] cleave concat zip
211204
212-.. code:: ipython2
205+.. code:: ipython3
213206
214207 J('[1 2 3 4] dup size 2 / [drop] [take reverse] cleave concat zip')
215208
@@ -221,7 +214,7 @@
221214
222215 I realized that each pair is repeated...
223216
224-.. code:: ipython2
217+.. code:: ipython3
225218
226219 J('[1 2 3 4] dup size 2 / [drop] [take reverse] cleave zip')
227220
@@ -231,11 +224,11 @@
231224 [1 2 3 4] [[1 3] [2 4]]
232225
233226
234-.. code:: ipython2
227+.. code:: ipython3
235228
236- define('AoC2017.1.extra == dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *')
229+ define('AoC2017.1.extra dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *')
237230
238-.. code:: ipython2
231+.. code:: ipython3
239232
240233 J('[1 2 1 2] AoC2017.1.extra')
241234
@@ -245,7 +238,7 @@
245238 6
246239
247240
248-.. code:: ipython2
241+.. code:: ipython3
249242
250243 J('[1 2 2 1] AoC2017.1.extra')
251244
@@ -255,7 +248,7 @@
255248 0
256249
257250
258-.. code:: ipython2
251+.. code:: ipython3
259252
260253 J('[1 2 3 4 2 5] AoC2017.1.extra')
261254
diff -r 33cf8e5aec62 -r ab34fee54595 docs/Makefile
--- a/docs/Makefile Sat May 30 23:39:16 2020 -0700
+++ b/docs/Makefile Wed Jun 03 07:52:21 2020 -0700
@@ -23,7 +23,7 @@
2323 python -m nbconvert --to rst $<
2424
2525
26-move_us = Derivatives_of_Regular_Expressions.rst Generator_Programs.rst Newton-Raphson.rst Ordered_Binary_Trees.rst Quadratic.rst Recursion_Combinators.rst Replacing.rst Square_Spiral.rst The_Four_Operations.rst Treestep.rst TypeChecking.rst Types.rst Zipper.rst
26+move_us = Advent_of_Code_2017_December_1st.rst Derivatives_of_Regular_Expressions.rst Generator_Programs.rst Newton-Raphson.rst Ordered_Binary_Trees.rst Quadratic.rst Recursion_Combinators.rst Replacing.rst Square_Spiral.rst The_Four_Operations.rst Treestep.rst TypeChecking.rst Types.rst Zipper.rst
2727
2828 mov: $(move_us)
2929 cp -v $? ./sphinx_docs/notebooks/
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/index.html
--- a/docs/sphinx_docs/_build/html/index.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/index.html Wed Jun 03 07:52:21 2020 -0700
@@ -163,6 +163,8 @@
163163 <li class="toctree-l2"><a class="reference internal" href="notebooks/Developing.html">Developing a Program in Joy</a></li>
164164 <li class="toctree-l2"><a class="reference internal" href="notebooks/Quadratic.html">Quadratic formula</a></li>
165165 <li class="toctree-l2"><a class="reference internal" href="notebooks/Replacing.html">Replacing Functions in the Dictionary</a></li>
166+<li class="toctree-l2"><a class="reference internal" href="notebooks/Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
167+<li class="toctree-l2"><a class="reference internal" href="notebooks/Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
166168 <li class="toctree-l2"><a class="reference internal" href="notebooks/Recursion_Combinators.html">Recursion Combinators</a></li>
167169 <li class="toctree-l2"><a class="reference internal" href="notebooks/Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
168170 <li class="toctree-l2"><a class="reference internal" href="notebooks/Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Derivatives_of_Regular_Expressions.html
--- a/docs/sphinx_docs/_build/html/notebooks/Derivatives_of_Regular_Expressions.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Derivatives_of_Regular_Expressions.html Wed Jun 03 07:52:21 2020 -0700
@@ -871,6 +871,8 @@
871871 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
872872 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
873873 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
874+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
875+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
874876 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
875877 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
876878 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Generator_Programs.html
--- a/docs/sphinx_docs/_build/html/notebooks/Generator_Programs.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Generator_Programs.html Wed Jun 03 07:52:21 2020 -0700
@@ -522,6 +522,8 @@
522522 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
523523 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
524524 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
525+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
526+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
525527 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
526528 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
527529 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Newton-Raphson.html
--- a/docs/sphinx_docs/_build/html/notebooks/Newton-Raphson.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Newton-Raphson.html Wed Jun 03 07:52:21 2020 -0700
@@ -259,6 +259,8 @@
259259 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
260260 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
261261 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
262+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
263+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
262264 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
263265 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
264266 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Ordered_Binary_Trees.html
--- a/docs/sphinx_docs/_build/html/notebooks/Ordered_Binary_Trees.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Ordered_Binary_Trees.html Wed Jun 03 07:52:21 2020 -0700
@@ -1317,6 +1317,8 @@
13171317 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
13181318 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
13191319 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
1320+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
1321+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
13201322 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
13211323 <li class="toctree-l2 current"><a class="current reference internal" href="#">Treating Trees I: Ordered Binary Trees</a></li>
13221324 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Quadratic.html
--- a/docs/sphinx_docs/_build/html/notebooks/Quadratic.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Quadratic.html Wed Jun 03 07:52:21 2020 -0700
@@ -196,6 +196,8 @@
196196 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
197197 <li class="toctree-l2 current"><a class="current reference internal" href="#">Quadratic formula</a></li>
198198 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
199+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
200+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
199201 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
200202 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
201203 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Recursion_Combinators.html
--- a/docs/sphinx_docs/_build/html/notebooks/Recursion_Combinators.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Recursion_Combinators.html Wed Jun 03 07:52:21 2020 -0700
@@ -16,7 +16,7 @@
1616 <link rel="index" title="Index" href="../genindex.html" />
1717 <link rel="search" title="Search" href="../search.html" />
1818 <link rel="next" title="Treating Trees I: Ordered Binary Trees" href="Ordered_Binary_Trees.html" />
19- <link rel="prev" title="Replacing Functions in the Dictionary" href="Replacing.html" />
19+ <link rel="prev" title="Joy Example Code" href="Advent_of_Code_2017_December_1st.html" />
2020
2121 <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
2222
@@ -622,6 +622,8 @@
622622 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
623623 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
624624 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
625+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
626+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
625627 <li class="toctree-l2 current"><a class="current reference internal" href="#">Recursion Combinators</a></li>
626628 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
627629 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
@@ -644,7 +646,7 @@
644646 <ul>
645647 <li><a href="../index.html">Documentation overview</a><ul>
646648 <li><a href="index.html">Essays about Programming in Joy</a><ul>
647- <li>Previous: <a href="Replacing.html" title="previous chapter">Replacing Functions in the Dictionary</a></li>
649+ <li>Previous: <a href="Advent_of_Code_2017_December_1st.html" title="previous chapter">Joy Example Code</a></li>
648650 <li>Next: <a href="Ordered_Binary_Trees.html" title="next chapter">Treating Trees I: Ordered Binary Trees</a></li>
649651 </ul></li>
650652 </ul></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Replacing.html
--- a/docs/sphinx_docs/_build/html/notebooks/Replacing.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Replacing.html Wed Jun 03 07:52:21 2020 -0700
@@ -15,7 +15,7 @@
1515 <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
1616 <link rel="index" title="Index" href="../genindex.html" />
1717 <link rel="search" title="Search" href="../search.html" />
18- <link rel="next" title="Recursion Combinators" href="Recursion_Combinators.html" />
18+ <link rel="next" title="Joy Example Code" href="Advent_of_Code_2017_December_1st.html" />
1919 <link rel="prev" title="Quadratic formula" href="Quadratic.html" />
2020
2121 <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@@ -195,6 +195,8 @@
195195 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
196196 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
197197 <li class="toctree-l2 current"><a class="current reference internal" href="#">Replacing Functions in the Dictionary</a></li>
198+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
199+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
198200 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
199201 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
200202 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
@@ -218,7 +220,7 @@
218220 <li><a href="../index.html">Documentation overview</a><ul>
219221 <li><a href="index.html">Essays about Programming in Joy</a><ul>
220222 <li>Previous: <a href="Quadratic.html" title="previous chapter">Quadratic formula</a></li>
221- <li>Next: <a href="Recursion_Combinators.html" title="next chapter">Recursion Combinators</a></li>
223+ <li>Next: <a href="Advent_of_Code_2017_December_1st.html" title="next chapter">Joy Example Code</a></li>
222224 </ul></li>
223225 </ul></li>
224226 </ul>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/The_Four_Operations.html
--- a/docs/sphinx_docs/_build/html/notebooks/The_Four_Operations.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/The_Four_Operations.html Wed Jun 03 07:52:21 2020 -0700
@@ -348,6 +348,8 @@
348348 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
349349 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
350350 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
351+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
352+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
351353 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
352354 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
353355 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Treestep.html
--- a/docs/sphinx_docs/_build/html/notebooks/Treestep.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Treestep.html Wed Jun 03 07:52:21 2020 -0700
@@ -518,6 +518,8 @@
518518 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
519519 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
520520 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
521+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
522+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
521523 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
522524 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
523525 <li class="toctree-l2 current"><a class="current reference internal" href="#">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/TypeChecking.html
--- a/docs/sphinx_docs/_build/html/notebooks/TypeChecking.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/TypeChecking.html Wed Jun 03 07:52:21 2020 -0700
@@ -184,6 +184,8 @@
184184 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
185185 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
186186 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
187+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
188+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
187189 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
188190 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
189191 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Types.html
--- a/docs/sphinx_docs/_build/html/notebooks/Types.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Types.html Wed Jun 03 07:52:21 2020 -0700
@@ -2402,6 +2402,8 @@
24022402 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
24032403 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
24042404 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
2405+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
2406+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
24052407 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
24062408 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
24072409 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/Zipper.html
--- a/docs/sphinx_docs/_build/html/notebooks/Zipper.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/Zipper.html Wed Jun 03 07:52:21 2020 -0700
@@ -334,6 +334,8 @@
334334 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
335335 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
336336 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
337+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
338+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
337339 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
338340 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
339341 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/notebooks/index.html
--- a/docs/sphinx_docs/_build/html/notebooks/index.html Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/notebooks/index.html Wed Jun 03 07:52:21 2020 -0700
@@ -56,6 +56,11 @@
5656 <li class="toctree-l2"><a class="reference internal" href="Replacing.html#a-shorter-trace">A shorter trace</a></li>
5757 </ul>
5858 </li>
59+<li class="toctree-l1"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a><ul>
60+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#next-part-of-the-challenge">Next Part of the Challenge</a></li>
61+</ul>
62+</li>
63+<li class="toctree-l1"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
5964 <li class="toctree-l1"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a><ul>
6065 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html#designing-recursive-functions">Designing Recursive Functions</a></li>
6166 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html#primitive-recursive-functions">Primitive Recursive Functions</a></li>
@@ -197,6 +202,8 @@
197202 <li class="toctree-l2"><a class="reference internal" href="Developing.html">Developing a Program in Joy</a></li>
198203 <li class="toctree-l2"><a class="reference internal" href="Quadratic.html">Quadratic formula</a></li>
199204 <li class="toctree-l2"><a class="reference internal" href="Replacing.html">Replacing Functions in the Dictionary</a></li>
205+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html">Joy Example Code</a></li>
206+<li class="toctree-l2"><a class="reference internal" href="Advent_of_Code_2017_December_1st.html#refactor-ftw">Refactor FTW</a></li>
200207 <li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a></li>
201208 <li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
202209 <li class="toctree-l2"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/objects.inv
Binary file docs/sphinx_docs/_build/html/objects.inv has changed
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/_build/html/searchindex.js
--- a/docs/sphinx_docs/_build/html/searchindex.js Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/_build/html/searchindex.js Wed Jun 03 07:52:21 2020 -0700
@@ -1,1 +1,1 @@
1-Search.setIndex({docnames:["index","joy","lib","library","notebooks/Categorical","notebooks/Derivatives_of_Regular_Expressions","notebooks/Developing","notebooks/Generator_Programs","notebooks/Intro","notebooks/Newton-Raphson","notebooks/NoUpdates","notebooks/Ordered_Binary_Trees","notebooks/Quadratic","notebooks/Recursion_Combinators","notebooks/Replacing","notebooks/Square_Spiral","notebooks/The_Four_Operations","notebooks/Treestep","notebooks/TypeChecking","notebooks/Types","notebooks/Zipper","notebooks/index","parser","pretty","stack","types"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":2,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["index.rst","joy.rst","lib.rst","library.rst","notebooks/Categorical.rst","notebooks/Derivatives_of_Regular_Expressions.rst","notebooks/Developing.rst","notebooks/Generator_Programs.rst","notebooks/Intro.rst","notebooks/Newton-Raphson.rst","notebooks/NoUpdates.rst","notebooks/Ordered_Binary_Trees.rst","notebooks/Quadratic.rst","notebooks/Recursion_Combinators.rst","notebooks/Replacing.rst","notebooks/Square_Spiral.rst","notebooks/The_Four_Operations.rst","notebooks/Treestep.rst","notebooks/TypeChecking.rst","notebooks/Types.rst","notebooks/Zipper.rst","notebooks/index.rst","parser.rst","pretty.rst","stack.rst","types.rst"],objects:{"joy.joy":{joy:[1,1,1,""],repl:[1,1,1,""],run:[1,1,1,""]},"joy.library":{"void":[3,1,1,""],BinaryBuiltinWrapper:[3,1,1,""],DefinitionWrapper:[3,2,1,""],FunctionWrapper:[3,1,1,""],SimpleFunctionWrapper:[3,1,1,""],UnaryBuiltinWrapper:[3,1,1,""],add_aliases:[3,1,1,""],app1:[3,1,1,""],app2:[3,1,1,""],app3:[3,1,1,""],b:[3,1,1,""],branch:[3,1,1,""],choice:[3,1,1,""],clear:[3,1,1,""],cmp_:[3,1,1,""],concat_:[3,1,1,""],cond:[3,1,1,""],dip:[3,1,1,""],dipd:[3,1,1,""],dipdd:[3,1,1,""],disenstacken:[3,1,1,""],divmod_:[3,1,1,""],drop:[3,1,1,""],dupdip:[3,1,1,""],floor:[3,1,1,""],genrec:[3,1,1,""],getitem:[3,1,1,""],help_:[3,1,1,""],i:[3,1,1,""],id_:[3,1,1,""],infra:[3,1,1,""],initialize:[3,1,1,""],inscribe:[3,1,1,""],inscribe_:[3,1,1,""],loop:[3,1,1,""],map_:[3,1,1,""],max_:[3,1,1,""],min_:[3,1,1,""],parse:[3,1,1,""],pm:[3,1,1,""],pred:[3,1,1,""],primrec:[3,1,1,""],remove:[3,1,1,""],reverse:[3,1,1,""],select:[3,1,1,""],sharing:[3,1,1,""],shunt:[3,1,1,""],sort_:[3,1,1,""],sqrt:[3,1,1,""],step:[3,1,1,""],succ:[3,1,1,""],sum_:[3,1,1,""],take:[3,1,1,""],times:[3,1,1,""],unique:[3,1,1,""],warranty:[3,1,1,""],words:[3,1,1,""],x:[3,1,1,""],zip_:[3,1,1,""]},"joy.library.DefinitionWrapper":{add_def:[3,3,1,""],add_definitions:[3,3,1,""],parse_definition:[3,3,1,""]},"joy.parser":{ParseError:[22,4,1,""],Symbol:[22,2,1,""],text_to_expression:[22,1,1,""]},"joy.utils":{generated_library:[3,0,0,"-"],pretty_print:[23,0,0,"-"],stack:[24,0,0,"-"]},"joy.utils.generated_library":{ccons:[3,1,1,""],cons:[3,1,1,""],dup:[3,1,1,""],dupd:[3,1,1,""],dupdd:[3,1,1,""],first:[3,1,1,""],first_two:[3,1,1,""],fourth:[3,1,1,""],over:[3,1,1,""],pop:[3,1,1,""],popd:[3,1,1,""],popdd:[3,1,1,""],popop:[3,1,1,""],popopd:[3,1,1,""],popopdd:[3,1,1,""],rest:[3,1,1,""],rolldown:[3,1,1,""],rollup:[3,1,1,""],rrest:[3,1,1,""],second:[3,1,1,""],stack:[3,1,1,""],stuncons:[3,1,1,""],stununcons:[3,1,1,""],swaack:[3,1,1,""],swap:[3,1,1,""],swons:[3,1,1,""],third:[3,1,1,""],tuck:[3,1,1,""],uncons:[3,1,1,""],unit:[3,1,1,""],unswons:[3,1,1,""]},"joy.utils.pretty_print":{TracePrinter:[23,2,1,""],trace:[23,1,1,""]},"joy.utils.pretty_print.TracePrinter":{go:[23,3,1,""],viewer:[23,3,1,""]},"joy.utils.stack":{concat:[24,1,1,""],expression_to_string:[24,1,1,""],iter_stack:[24,1,1,""],list_to_stack:[24,1,1,""],pick:[24,1,1,""],stack_to_string:[24,1,1,""]},joy:{joy:[1,0,0,"-"],library:[3,0,0,"-"],parser:[22,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","exception","Python exception"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:exception"},terms:{"05s":5,"0b11100111011011":6,"23rd":19,"4ac":12,"5bkei":11,"9a9d60354c35":19,"\u03b4":5,"\u03b5":9,"abstract":[8,11],"boolean":[2,3,8,11,16],"break":[5,8,15,19],"byte":[5,6],"case":[2,3,13,16,17,19,24],"char":5,"class":[3,5,8,19,22,23,24],"const":15,"default":[3,7,11,24],"export":[3,22],"final":[2,11,13,15],"float":[8,19,20,22],"function":[0,1,4,6,7,10,12,15,18,20,21,22,23,24,25],"g\u00e9rard":20,"goto":5,"import":[2,5,6,7,9,11,12,13,14,15,17,18,19,20],"int":[5,7,8,13,15,19,20,22,24],"long":[11,15,19,21],"new":[0,2,3,5,7,8,10,13,14,15,19],"p\u00f6ial":21,"p\u00f6ial06typingtool":19,"public":10,"return":[1,3,5,6,8,11,13,14,16,17,19,22,23,24],"short":15,"static":[2,10],"super":19,"switch":[2,19],"throw":[11,25],"true":[2,3,5,6,13,15,16,19],"try":[7,9,12,13,15,17,18,19,21],"void":[0,3,15],"while":[3,5,8,11,19,22,24],AND:[5,19],Adding:[8,14,21],And:[5,6,7,9,11,13,15,16,19,20,24],But:[0,4,6,7,8,11,14,15,19],CPS:8,For:[0,2,3,11,13,14,19,21,24],Its:3,NOT:5,Not:19,One:[2,8,16,19,21],REs:5,TOS:[2,3],That:[6,11],The:[0,1,2,3,4,5,7,9,10,12,20,21,22,23,24,25],Then:[2,3,11,12,13,19],There:[5,12,13,15,16,17,19,24],These:[16,19,21,24],Use:[3,9,13],Used:16,Using:[0,9,11,21],With:[9,13,15,19,21,25],_1000:19,__add__:19,__call__:5,__class__:19,__eq__:19,__ge__:19,__hash__:19,__init__:[5,19],__main__:19,__radd__:19,__repr__:19,__str__:23,_and:5,_compaction_rul:5,_con:5,_dictionari:19,_ge:19,_infer:19,_interpret:19,_log:19,_log_it:19,_names_for:19,_or:5,_spn_e:15,_spn_p:15,_spn_t:15,_templat:5,_to_str:19,_tree_add_:11,_tree_add_e:[11,25],_tree_add_p:11,_tree_add_r:11,_tree_add_t:11,_tree_delete_:11,_tree_delete_clear_stuff:[11,25],_tree_delete_del:11,_tree_delete_r0:[11,25],_tree_delete_r1:11,_tree_delete_rightmost:11,_tree_delete_w:11,_tree_get_:[11,25],_tree_get_p:11,_tree_get_r:11,_tree_get_t:11,_tree_iter_order_curr:11,_tree_iter_order_left:11,_tree_iter_order_r:11,_tree_iter_order_right:11,_tree_t:11,_treestep_0:17,_treestep_1:17,_uniqu:19,_within_b:9,_within_p:9,_within_r:9,a10001:19,a10002:19,a10003:19,a10004:19,a_i:9,abbrevi:17,abl:[5,16,19,25],about:[0,8,11,16,19,20,24],abov:[0,5,6,9,11,13,16,19],abs:[0,9,15],absolut:8,accept:[0,1,2,3,5,6,7,8,11,12,14,15,16,17,19,20],accord:5,accordingli:[11,16],accumul:6,act:[5,25],action:[0,8,14,15,19,20,21],actual:[2,6,8,11,16,19],adapt:[15,21],add:[3,5,6,7,8,14,19,23,25],add_alias:3,add_def:3,add_definit:[3,11,17],added:[4,11],adding:[10,19],addit:[0,2,3,6,8,13,14,17],address:21,adjust:11,advantag:19,affect:[3,16],after:[5,6,7,8,13,16,19,25],afterward:8,again:[2,3,6,8,11,13,19],against:19,aggreg:20,ahead:19,aka:[5,8,20,25],albrecht:0,algorithm:[5,8,19],alia:3,alias:[3,8],align:[8,23],all:[3,5,6,7,8,11,13,14,15,16,17,19,23],alloc:19,allow:[10,11,16],almost:11,along:[5,8,13,19],alphabet:[3,21],alreadi:[5,9,14,19,20],also:[0,5,6,8,11,16,19,23,24],alter:[5,19],altern:[4,19],although:[4,11],altogeth:7,alwai:[6,10,13,16],amend:16,among:19,amort:11,analysi:[4,21],anamorph:[8,21],ani:[0,4,5,6,8,10,11,15,16,19,20,22],annual:8,anonym:11,anoth:[5,11,16,19,24,25],anyhow:[16,19],anyjoytyp:19,anymor:19,anystarjoytyp:19,anyth:[2,3,5,8,19,25],apart:19,api:10,app1:3,app2:[3,8,12,13,14,16],app3:[3,16],app:8,appear:[2,4,5,6,11],append:19,appendix:21,appli:[2,3,6,7,11,13,15,19],applic:7,approach:6,appropri:5,approxim:21,archiv:0,aren:20,arg:[2,3,15],argument:[2,3,8,9,12,13,15,21,23,24],arithmet:2,ariti:[2,16],around:[6,19,22,24],arrang:[15,17],arriv:[7,17],arrow:5,articl:[0,4,7,13],ascii:5,ascii_lowercas:5,ask:[4,7,19],aspect:0,assembl:[5,15],assert:[5,19],assign:[16,24],associ:11,assum:9,asterisk:17,asterix:[19,25],asyncron:16,attack:8,attempt:[0,1,19],attribut:3,attributeerror:19,author:19,auto:[0,19,25],automat:[4,16,19],auxiliari:[5,17],avail:[0,19,25],averag:[8,14],avoid:11,awai:[11,19],awar:2,awkward:[11,13,19],azur:21,back:[3,11,19],backtrack:25,backward:[10,11,12,17],bad:19,bag:8,banana:13,bar:16,barb:13,base:[0,2,3,10,13,17,19],basic:[2,3,8,11],basicconfig:[18,19],becaas:5,becaus:[2,3,5,8,11,16,17,19,20,24],becom:[0,11,15,17,24],becuas:19,been:[5,9,10,11,19,20],befor:[5,7,8,11],begin:[11,17],behavior:[10,17,25],behaviour:[0,1,19],behind:16,being:[0,16],below:[2,3,5,6,7,11,15,19,20],bespok:8,best:0,better:[6,11,13,19],between:[0,6],beyond:7,biannual:8,bin:5,binari:[0,7,8,21],binary_search_tre:11,binarybuiltinwrapp:3,bind:8,bingo:20,bit:[5,6,7,11,19],blank:22,bliss:[0,21],block:6,bodi:[2,3,5,8,11,16],body_text:3,booktitl:19,bool:[13,19,25],borrow:[8,19],both:[2,6,8,12,13,14,15,16,19,24],bottom:7,bounce_to:5,bracket:[8,19,22],branch:[3,5,6,7,13,19,21,25],branch_fals:19,branch_tru:19,breakpoint:8,bring:[6,8,19],bruijn:19,brutal:16,brzozowski:[19,21],brzozowskian:5,btree:[11,17],buck:11,bug:[0,8],build:[7,8,12,13,15,20,24],built:[12,19],bundl:[2,3,13],burgeon:8,calculu:4,call:[1,2,5,8,10,11,13,16,19,23,24],caller:[11,19],can:[0,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,19,20,21,22,24,25],cancel:16,cannot:[18,19,22],captur:8,card:8,care:[6,24],carefulli:20,carri:[7,11],cartesian:4,catamorph:21,categor:[0,21],categori:[4,16],ccc:4,ccon:[3,11,18,19,25],cell:[13,19],certain:[8,24],certainli:11,chain:[3,16],chang:[2,10,11,15,19,20],charact:[5,20],chat:8,chatter:[0,19],check:[0,7,9,19,21],child:17,choic:[3,13],choos:10,chop:12,chose:5,cinf:11,circl:5,circuit:[4,15],cite_not:11,classmethod:3,claus:[3,19],clean:19,clear:[3,6,8],clear_stuff:11,cleav:[8,12,14],close:[0,1,4],clunki:[6,19],clv:16,cmp:[3,17,21],cmp_:3,code:[1,4,5,12,13,16,19,21,25],codireco:[7,9,15],collaps:13,collect:[4,5,7,8,19],combin:[0,3,6,7,8,9,12,15,16,17,20,21,23,25],combinatorjoytyp:19,come:[8,11,19],command:[8,11,19],comment:16,common:[2,6,16],compar:[3,4,5,15,19],comparison:[0,11],compat:16,compel:4,compil:[2,4,5,8,11,14,16,21,25],complement:5,complet:4,complex:[3,16,19,20,25],complic:19,compos:[5,25],composit:19,compostit:19,compound:11,comput:[2,4,5,6,8,12,15,16,19,25],con:[3,5,6,7,8,9,11,12,13,15,16,17,20,24,25],conal:[4,16],concat:[3,7,8,16,17,19,24],concat_:3,concaten:[0,5],concatin:[0,3,5,24],concern:16,conclus:21,concurr:2,cond:[3,11],condit:[3,8],condition:15,confer:19,conflict:[11,19],consecut:21,consid:[5,6,7,11,13,17,19,20],consist:[2,7,8,16,17],constant:11,constitu:13,constraint:15,construct:[0,15,16,19],consum:[15,16,19],contain:[0,2,3,5,7,8,13,15,19,22],content:19,context:2,conting:11,continu:[0,5,13,19,20],control:8,conveni:[4,16,19],convent:16,convers:19,convert:[13,14,17,19,22,24],cool:11,coordin:[0,15],copi:[2,3,6,11,13,15,16,17,18,21],copyright:8,correspond:[4,16],could:[2,4,5,6,8,10,11,16,19,20],couldn:16,count:[3,19],counter:[6,19],coupl:17,cours:[6,11,19],cout:15,cover:19,cpu:16,crack:11,crash:11,creat:[0,2,3,6,9,11,16,19],creativ:19,crude:[11,19,22],cruft:19,curent:25,current:[2,3,8,13,15,16,17,19,20,23,25],curri:5,custom:10,cycl:[6,7],cython:8,d010101:5,d0101:5,d01:5,d10:5,d_compact:5,dai:8,data:[2,3,5,13],datastructur:[0,2,13,19,21,22,24],datatyp:24,ddididi:20,deal:[0,5,11,16],dealt:19,debugg:19,decid:11,declar:19,decor:3,decoupl:13,decrement:[0,3],deduc:[6,19],deeper:0,deepli:4,def:[3,5,8,13,14,19,24],defaultdict:[5,19],defi:3,defin:[2,3,4,5,6,7,8,9,10,12,13,14,15,16,19,20,21],definit:[0,2,3,6,7,8,10,11,13,15,17,19,21,25],definitionwrapp:[3,11,13,17],defint:16,del:18,deleg:8,delet:21,deliber:19,demo:19,demonstr:4,depend:[3,11,13,16],deposit:17,depth:[19,25],dequot:13,der:11,deriv:[2,3,6,8,9,11,19,21],derv:5,describ:[3,4,5,11,13,16,17,19,22],descript:[6,8],descriptor:19,design:[2,3,11,16,21],desir:[8,17],destin:5,destruct:11,detail:[8,11,19],detect:[5,7,11,13,19],determin:21,develop:[0,7,8,19,21],diagram:6,dialect:1,dict:[1,3,5,19,23],dictionari:[0,1,3,8,19,21,23],did:19,differ:[0,4,6,9,11,12,13,16,24],differenti:4,difficult:19,difficulti:16,dig:[11,20],digit:6,digraph:5,dinfrirst:[8,15,19,25],dip:[0,3,6,7,8,9,11,12,13,14,15,16,17,19,21,25],dipd:[3,7,8,11,12,13,15,16,19,20,25],dipdd:[3,11],direco:21,direct:8,directli:[6,16,17,19,24],disappear:[2,5,19],discard:[3,7,9,11,13],disciplin:11,disctionari:1,disenstacken:[3,8],disk:8,displac:2,displai:19,distiguish:19,distribut:16,ditch:11,div:[3,8,19,25],dive:17,divis:[11,19],divmod:[3,25],divmod_:[3,19],doc:[2,3,8,19],doc_from_stack_effect:18,docstr:19,document:[19,21,22,24],doe:[0,1,3,4,5,7,8,14,16,19,21,23,25],doesn:[6,10,11,15,16,17,19,24],doing:[4,6,8,16,19,20],domain:[4,19],don:[5,6,8,11,19],done:[2,6,8,10,19],dooooc:19,door:8,dot:[5,23],doubl:[3,5,6,8,19],doublecircl:5,down:[2,5,9,13,20,25],down_to_zero:8,dozen:8,draft:[4,10],dream:8,drive:[7,9],driven:6,driver:[5,7],drop:[3,11],dudipd:8,due:19,dup:[3,6,7,8,9,11,12,13,15,16,18,20,24,25],dupd:[3,19,25],dupdd:[3,25],dupdip:[3,6,11,12,13,15],duplic:[3,11,13],durat:2,dure:[2,13],each:[2,3,4,5,6,8,13,14,15,16,17,19,23,25],easi:[0,11,15,17,19,20],easier:[3,11,16],easili:4,eat:5,edit:21,effect:[2,3,5,8,16,20,21,25],effici:[7,14,20],efg:19,either:[1,2,3,5,11,13,19],elabor:19,eleg:[0,5,8,11,16,21],element:[2,3],elif:19,elimin:[5,19],elliott:[4,16],els:[2,3,5,13,15,16,19],else_:19,embed:[4,11,20],emit:19,empti:[3,5,8,17,19,24,25],encapsul:8,enclos:8,encod:7,encount:19,end:[5,6,11,13,17,19,24],endless:7,enforc:[2,8],engend:8,enough:[5,8,13,23,25],enstacken:[7,8,19],enter:[3,8],enter_guard:19,entir:24,entri:[3,20,23],enumer:19,epsilon:9,equal:[3,6,17,24],equat:[8,9],equival:16,ergo:[5,11],err:[11,18],error:[8,19,22],essai:0,establish:19,etc:[3,17,19,20,22],euler:21,euro:19,eval:[0,19],evalu:[1,2,3,8,9,11,12,13,14,16,17,19,23],event:16,eventu:[16,19],ever:19,everi:[1,7,16],everybodi:16,everyth:[3,5,11,12,16,19],evolv:10,examin:13,exampl:[3,5,6,19,21,22,24,25],exce:7,except:[5,8,11,18,19,22],execut:[0,1,2,3,8,13,14,16,17,19,20,24,25],exend:19,exercis:[5,11],exist:[4,11,19],expand:11,expect:[2,3,16,17,19,24],experi:[8,17],explain:19,explan:8,explor:[8,19],express:[0,1,2,3,4,11,13,14,15,19,20,21,23,24],expression_to_str:[19,24],extend:19,extra:[6,7],extract:[11,12,21],extrem:8,extrememli:8,f_g:19,f_in:19,f_out:19,f_python:19,facet:0,facil:8,fact:22,factor:[2,6,8,11,15,19],factori:[3,21],fail:[2,3,11,21,22],fail_fail:3,fairli:19,fake:5,fall:19,fals:[2,3,5,6,13,15,16,19],falsei:19,familiar:[0,15],far:[9,11,13,19,25],fascin:0,favorit:16,fear:[11,19],few:[6,8,9,12,16,19],fewer:[3,8],fg_in:19,fg_out:19,fib:7,fib_gen:7,fibonacci:21,figur:[2,3,11,13,19],file:15,filter:11,fin:6,find:[2,3,5,6,7,16,17,19,21,25],finder:9,fine:[0,5,6,11,19,25],finite_state_machin:5,first:[3,5,7,8,9,11,12,13,14,17,20,21,25],first_two:[3,11,25],fit:[6,8],five:[6,8,21],fix:[2,3,5,13,19],fixm:[5,19],flag:[16,19],flatten:[8,17,19],flesh:5,flexibl:21,floatjoytyp:19,floatstarjoytyp:19,floor:3,floordiv:[6,25],flow:8,follow:[0,2,3,5,8,10,13,16,17,19,20],foo:[8,10,11,16,19],foo_ii:10,fork:16,form:[2,3,4,5,6,7,13,17,19,21,24],forman:8,format:[18,19,21,23],formula:[0,6,21],forth:[8,19],forum:0,forward:19,found:8,four:[0,2,3,6,7,8,11,15,21],fourteen:6,fourth:[2,3,11,13,25],frac:[9,12],fractal:8,fraction0:8,fraction:[2,8],frame:13,framework:8,free:[4,8,11],freeli:2,from:[0,1,2,3,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,24],from_:5,front:[2,3,13],frozenset:5,fulin:16,full:6,fun:[5,21],func:19,functionjoytyp:19,functionwrapp:3,functool:5,fundament:[0,21],funtion:11,further:[9,19,21],futur:16,g_in:19,g_out:19,garbag:8,gari:11,gcd:8,gener:[0,2,4,13,16,19,21,24,25],generated_librari:3,genrec:[3,8,11,13,16,17,19],geometr:6,get:[2,4,5,6,7,8,12,13,19,21],getch:5,getitem:3,getrecursionlimit:24,getsourc:8,ghc:4,give:[4,6,11,13,15,17,19,24],given:[2,3,6,7,9,11,13,15,16,19,20,21],global:[18,19],glue:8,goe:25,going:[5,11,12,15,16,17,19,20],good:[6,11,19],grab:19,grammar:22,grand:8,graph:16,graphic:5,graphviz:5,great:[0,8,19,21],greater:24,grind:19,group:0,grow:5,gsra:9,guard:[11,19],had:[5,6,20],haiku:8,half:[6,19,20],hallmark:16,hand:[5,8,14,19,21],handi:[9,19],handl:[11,19,24,25],happen:[8,19],happi:5,hard:[5,19,20],hardwar:4,has:[0,2,3,5,7,8,9,10,11,13,16,19,20,24],hasattr:19,hash:19,haskel:4,have:[2,3,5,6,7,8,9,10,13,14,15,16,19,20,21,24,25],head:24,heh:19,help:[0,8,11,13,15,19],help_:3,helper:[3,5],herd:8,here:[0,5,6,7,11,15,17,19,20,25],hide:11,hierarchi:19,higher:[5,8,11,19],highli:8,hij:5,histori:[19,23],hit:5,hmm:[5,11],hoist:3,hold:[6,19],hood:11,hope:[0,6,8,21],hopefulli:13,host:21,how:[0,4,5,9,11,13,15,19,20,21],howev:[13,14,16,19],html:[2,3,7,12,13,21],http:[11,25],huet:20,huge:11,hugh:[9,17],human:8,hybrid:[15,25],hylomorph:21,hypothet:2,id_:3,idea:[4,6,8,19],ident:[3,5,13,19,25],if_not_empti:11,ift:[0,3,11,13,15,17,19,25],ignor:[1,3,11,19],iii:21,illustr:[5,13],imagin:[5,16,20],imap:19,imit:[5,17],immedi:[5,13],immut:[5,8,11],imper:13,implement:[0,1,2,3,4,8,10,11,13,14,16,21,25],implementaion:16,implicit:8,improv:19,includ:[4,11,16,17,19,25],inclus:6,incom:24,incompat:10,incorpor:12,increas:6,increment:[0,3,4,6,10,16],index:[0,8,19,24],indexerror:24,indic:[16,17,19,25],ineffici:19,infer:[0,18],inferenc:25,info:[18,19],inform:[3,5,19,25],infra:[3,7,8,11,12,14,15,16,17,19,21,25],infrastructur:3,initi:[2,3,5,8,9,11,19],inlin:11,inner:19,inproceed:19,input:[1,9,16,18,19],input_:5,inscrib:3,inscribe_:3,insert:19,insight:13,inspect:8,inspect_stack:19,instal:0,instanc:19,instanti:[4,23],instead:[5,6,7,11,13,15,19,20,24,25],instruct:5,integ:[0,2,3,8,13,15,17,19,22],integr:3,intend:[0,8],interact:[8,21],interest:[0,6,11,19,21],interfer:16,interlud:21,intermedi:13,intern:[0,19,23,24],interpret:[0,4,10,14,22,23,25],interrupt:8,intersect:5,interspers:16,interv:[4,6],intjoytyp:19,introduc:10,introduct:0,intstarjoytyp:19,intuit:19,invari:3,invent:19,involv:19,ipf:8,ipython:19,isinst:[5,19],isn:[5,11,20],issubclass:19,item:[2,3,8,11,13,16,17,19,21,24],iter:[1,3,5,8,13,16,17,19,21,24],iter_stack:[14,24],iteritem:[5,19],itertool:[5,19],its:[0,1,2,3,4,6,8,11,13,15,16,17,19,24],itself:[0,2,8,11,16,19],j05cmp:[2,3,13],jaanu:19,jmp:5,job:[16,21],john:[9,17],joi:[2,4,10,11,12,14,16,18],join:[5,19],joypi:[20,25],joytypeerror:18,jump:5,jump_from:5,junk:19,jupyt:21,just:[0,2,3,5,7,8,10,11,13,15,16,17,19,20,23],juxtaposit:16,keep:[5,11,12,16,19,20],kei:[5,17,21],kevin:0,key_n:11,keyerror:[5,11,19],kind:[0,2,4,8,11,13,15,17,19,25],kinda:19,kleen:[17,19],kleenestar:19,kleffner:19,know:[6,11,19],knowledg:19,known:[4,16],kstar:5,l_kei:11,l_left:11,l_right:11,l_valu:11,label:[5,19],lambda:[4,5,19],languag:[3,4,5,8,10,11,14,19],larg:[5,19],larger:[21,24],largest:3,last:[6,11,13,19],lastli:7,later:[5,8,15,17,19],law:2,layout:[0,15],lazi:19,lazili:9,lcm:6,lead:[5,8,19],leaf:11,lean:8,learn:0,least:[2,6,13,19,24],least_fract:8,leav:[3,6,15,16],left:[5,8,12,13,16,17,19,20,23,24],leftov:13,legend:5,legibl:[0,15],len:[5,19],length:[3,6,24],lens:13,less:[6,7,8,13,19,24],let:[7,9,11,12,13,15,17,19,20,21],letter:19,level:[4,5,11,18,19],librari:[0,5,14],like:[0,2,3,5,6,8,15,16,17,19,21,22,23,25],limit:[19,25],line:[3,8,11,12,19,23,25],linear:24,link:[0,5,19],linux:0,list:[0,3,5,6,8,9,11,13,16,17,19,20,23],list_to_stack:[19,24],liter:[1,11,17,19,20,22],literatur:19,littl:[0,5,7,11,15,16,19,21],live:21,lkei:17,load:[6,8],local:19,locat:2,locu:23,log:[18,19],log_2:11,logic:[0,6,15,21],longer:[11,19],look:[1,5,7,8,9,11,12,15,16,19],lookup:8,loop:[0,1,3,5,6,19,21,25],lose:19,lot:[5,8,11,19,20],love:6,low:[4,5],lower:6,lowercas:[5,19],lowest:11,lshift:25,machin:[0,21],machineri:[11,19],macro:8,made:[0,8,16,19,20],magic:19,mai:[2,13,16,25],mail:0,main:[0,3,8,12,15,16,19,20],mainloop:10,maintain:20,major:10,make:[2,3,4,6,8,11,13,14,15,16,17,19,20,21],make_gener:[9,15],make_graph:5,manfr:[0,2,3,4,13],mani:[0,5,8,19],manipul:19,manner:12,map:[1,3,5,6,8,10,13,17,19,23],map_:3,marker:8,mask:[6,7,15],match:[0,1,19,21],materi:0,math:[0,8,9,11,12,19],mathemat:8,matter:[6,9,11,17],max_:3,maximum:3,mayb:[11,19],mean:[4,6,8,9,11,13,17,19,24],meant:[8,11,13,17],mem:5,member:[2,3,13],memo:5,mental:8,mention:2,mercuri:0,mess:19,messag:[18,19],meta:[8,11,14],meta_compos:19,method:[0,3,8,19,21,23],midpoint:6,might:[0,4,5,7,11,15,19],mike:11,million:7,min_:3,mind:19,minimum:3,minor:11,minu:3,mirror:0,miscellan:0,mismatch:19,mix:[8,19],mod:3,mode:19,model:[4,8],modern:0,modif:[7,19],modifi:[8,11,20],modul:[0,1,3,8,19,22],modulo:19,modulu:[8,25],moment:19,month:8,more:[0,3,4,5,6,7,8,9,13,14,16,17,19,22,24,25],most:[5,19,25],mostli:0,move:[5,11],movement:2,much:[5,6,7,11,13,19],muck:11,mul:[3,8,12,18,20,23,25],multi:3,multipl:[21,25],multipli:3,must:[2,3,6,10,13,16,17,19,22],myself:19,n10001:19,n10002:19,n10003:19,n1001:19,n1002:19,n1003:19,name:[1,3,5,8,10,11,13,19,20,21,22,23,24,25],narr:19,natur:[5,6,7,11,19],navig:20,nearli:19,neat:11,neato:19,necessarili:19,need:[2,3,6,7,9,10,11,13,15,16,19],neg:[3,12,25],neither:[16,19],ness:5,nest:[3,8,11,20],net:25,network:8,never:[5,10,13],new_def:19,new_f:19,new_fo:19,new_kei:11,new_valu:11,newton:[0,21],next:[0,5,6,15,16,17,19,25],nice:[0,5,13,24],niether:2,node:[5,17,21],node_kei:11,node_valu:11,non:[5,17,19],none:[1,3,19],nope:17,nor:5,normal:16,notat:[0,8,11,15],note:[2,5,6,9,11,13,16,19,24],notebook:[6,7,8,19,20,21],notebook_preambl:[2,6,7,9,11,12,13,14,15,17,19,20],noth:[2,11,16],notic:6,now:[3,5,6,7,8,13,14,17,19,21],nth:[3,24],nullari:[8,11,15,16,19,25],number:[0,1,2,3,6,7,9,15,16,24,25],numberjoytyp:19,numberstarjoytyp:19,numer:19,object:[5,19,22],observ:6,obviou:7,obvious:19,occur:11,odd:[6,7],off:[2,3,6,7,12,15,19,20],often:[5,16],old:[2,14],old_k:11,old_kei:11,old_valu:11,omg:5,omit:[13,19,22],onc:[3,5,10,11],one:[0,2,3,5,6,7,11,13,15,16,17,19,23,24,25],ones:[5,7,19],onli:[2,3,5,6,11,13,15,16,19,20,24],onto:[1,2,3,8,13,24],open:[8,19],oper:[0,3,5,8,11,13,21,24],oppos:19,optim:11,option:[1,8,11,19,24],orchestr:16,order:[0,2,3,8,13,16,18,19,21,24],org:[0,11],origin:[0,1,2,3,11,20,21],osdn:25,other:[0,2,3,4,5,8,11,13,15,17,19,24],otherwis:[3,5,6,7,11,17,19],our:[5,6,7,8,9,13,15,17,19],out:[2,3,4,6,7,8,9,11,12,13,15,16,19,20,21],outcom:17,outlin:5,output:[5,9,13,16,18,19,25],outsid:4,over:[3,4,6,7,8,9,11,12,16,17,19,21,25],overhaul:19,overview:[3,19],own:[11,19],pack:24,packag:[0,8],page:[0,11,19,24],pair:[0,2,3,6,7,11,15,19],palidrom:6,palindrom:6,pam:8,paper:[4,8,13,16,20],paradigm:21,parallel:[2,21],paramet:[1,2,3,13,14,22,23,24],parameter:21,paramorph:13,parenthes:[11,24],pariti:7,pars:[0,3,5,8],parse_definit:3,parseerror:22,parser:[0,18,19],part:[2,3,9,13,17,21],partial:[5,19],particular:20,pass:[0,5,11,19,23],patch:5,path:[5,15,19,21],pattern:[5,6,16,17,21],pe1:[6,7],pe2:7,pearl:20,pend:[3,8,13,19,20,23],peopl:21,per:[8,17],perfectli:16,perform:[5,16,19],perhap:7,period:8,permit:[16,19,24],permut:19,persist:[3,11],phase:2,phi:5,phrase:15,pick:[6,7,16,24],pickl:8,pictur:11,piec:[13,21],pip:0,place:[3,6,8,19],plai:0,plu:3,plug:[7,13,17],point:[4,5,8,11,13,15,16],pointless:2,pool:16,pop:[0,3,5,6,7,8,11,13,14,15,17,18,24,25],popd:[3,8,9,11,14,16,19,25],popdd:[3,7,12,19,25],popop:[3,6,7,8,9,11,17,19,25],popopd:[3,25],popopdd:[3,25],posit:[3,6,8,13],possibilit:11,possibl:[11,17,19,21],post:8,poswrd:19,potenti:16,pow:25,power:[8,19],pprint:5,pragmat:6,preambl:9,preceed:16,precis:[0,1],pred:[3,19,25],predecessor:3,predic:[2,3,5,7,13,16],prefix:[19,23],preliminari:5,present:19,preserv:[4,17],pretti:[9,11,12,16,17,19,23,24],pretty_print:0,previou:[8,16],prime:9,primit:[2,3,19,21],primrec:[3,7,8,9,13],print:[0,1,2,3,5,18,19,23,24],probabl:[7,8,11,19],problem:[8,15,19,21],proc_curr:11,proc_left:11,proc_right:11,proce:[6,25],process:[5,8,17,19,23],produc:[3,6,11,13,17,19],product:[5,7,8,18,19],program:[0,2,3,7,8,9,11,13,15,16,19,20],programm:[16,19],progress:16,project:[21,25],prolog:19,promis:16,prompt:8,proper:[2,3,13,16,25],properti:0,provid:[0,3,4,8,16,19,25],pseudo:15,pun:[0,8],punctuat:19,pure:[0,5],puriti:8,purpos:8,push:[2,3,8,13,20,24],put:[1,2,7,8,16,19,21,24],pypi:0,python3:8,python:[0,2,3,5,11,13,16,20,21,22,24,25],quadrat:[0,21],quasi:15,queri:[11,17],query_kei:17,queu:13,quit:[0,17],quot:[0,3,7,8,11,12,13,15,16,17,19,20,23],quotat:[2,3,13],quotient:3,r_kei:11,r_left:11,r_right:11,r_valu:11,rais:[5,11,19,22,24],rang:[5,8,19],range_revers:13,range_to_zero:8,ranger:13,ranger_revers:13,rankdir:5,raphson:9,rather:[6,8,13,15,17],ratio:8,reach:[5,6,7,13],read:[0,1,6,7,11,19,20],readabl:14,reader:[5,11],readi:19,readm:15,real:11,realiz:[4,11,15],rearrang:[2,11,19],reason:[6,8,16,19],rebuild:[17,20],rec1:[2,3,13],rec2:[2,3,13],recent:19,recogn:22,recombin:16,record:[8,23],recur:[3,13,19],recurs:[0,2,3,5,7,8,9,16,19,21,24],recus:8,redefin:21,redistribut:[3,8],redo:5,reduc:[2,19],redund:24,refactor:[8,10],refer:[0,2],referenti:16,reflect:16,regard:16,region:15,regist:2,regular:[19,21,22],reifi:18,reimplement:[16,21],relat:[5,19],releas:10,remain:[2,8,10,19],remaind:[3,9],rememb:5,remind:19,remov:[3,11,19,24,25],render:21,repeat:6,repeatedli:6,repetit:5,repl:[0,1],replac:[0,2,3,7,12,13,16,17,19,20,21,24],repositori:0,repr:[5,19],repres:[2,8,11,16,22,23],represent:24,reprod:7,repurpos:19,requir:[15,16,19,24],res:19,research:19,resembl:8,resolut:16,resourc:[3,16],respect:[5,6,16],rest:[3,6,7,8,11,13,15,20,21,24,25],rest_two:11,restart:3,restor:2,result:[1,2,3,5,6,11,12,13,16,17,19,20],resum:8,retir:2,retri:8,reus:[11,19],revers:[3,6,7,13,19,20,21,24],revisit:19,rewrit:[3,8,15,19],rewritten:8,rid:11,right:[7,8,12,17,19,21,23,24],rightest:11,rightmost:6,rigor:16,risk:19,rkei:17,rob:19,roll:[3,9,11,17],roll_dn:19,rolldown:[3,18,19,25],rollup:[3,19,25],root:[3,9,12],rough:15,round:19,row:5,rrest:[3,18,19,25],rshift:25,rule:[16,21],run:[0,1,3,6,8,9,11,12,13,15,16,17,19,20],runtim:16,runtimeerror:24,sai:[5,7,11,12,15,17,19],same:[2,4,6,11,16,19,24],sandwich:[2,3,13],save:[2,5,6,8],scan:3,scanner:[8,22],scenario:20,scm:25,scope:[7,11],search:[0,11],sec:19,second:[3,8,11,13,15,17,24,25],section:13,see:[0,5,7,8,9,10,12,13,14,15,19,20,23],seem:[0,6,8,15,17,19,25],seen:[19,20],select:3,self:[5,16,19],semant:[2,3,8,10,11,16,19],semi:8,send:8,sens:[0,2,6,19,20],separ:[8,16,19,22],seq:19,sequenc:[0,1,2,3,6,8,11,13,14,20,21,22,25],sequence_to_stack:19,seri:[6,7,11,15,20],ses:19,set:[2,3,5,13,19,21],seven:[6,7],sever:[0,4,8,13],shape:[5,16],share:[3,8],shelf:2,shew:5,shift:[6,7],shorter:21,shorthand:11,should:[2,3,5,6,11,13,16,19],shouldn:8,show:[4,15,16,19,20],shunt:[3,20],side:[5,11,18,19,25],sign:3,signatur:25,signifi:[8,11],similar:[11,15,17,19],simon:8,simpl:[5,8,13,15,24,25],simplefunctionwrapp:[3,14,19],simpler:17,simplest:[19,21],simpli:4,simplifi:[6,11,20],sinc:[2,6,11,15,19],singl:[3,7,8,14,15,16,19,22,25],singleton:5,situ:11,situat:11,six:[6,7,8],sixti:[6,7],size:[5,8,21],skeptic:8,skip:19,slight:9,slightli:[11,13,19],smallest:3,smart:11,softwar:8,solei:2,solut:[6,7],solvabl:8,some:[0,2,3,5,7,8,11,13,15,16,17,19,21,24,25],somehow:[11,19],someth:[2,10,11,19],sometim:11,somewher:[11,21],sort:[3,5,11,16,19],sort_:3,sourc:[0,1,3,19,21,22,23,24],space:[6,23],span:6,spawn:19,special:[7,11,21],specif:[0,4],specifi:[11,16],speed:14,spell:[5,17],sphinx:[21,24],spiral:[0,21],spiral_next:15,spirit:[0,1,17],split:[5,19],sqr:[3,8,9,12,20],sqrt:[3,9,19,25],squar:[0,3,9,19,21,22],stack:[0,1,3,6,7,9,11,12,13,14,15,16,17,18,20,21,22,23,25],stack_effect:19,stack_effect_com:19,stack_to_str:[18,24],stacki:19,stackjoytyp:19,stackoverflow:15,stackstarjoytyp:19,stage:17,stai:[0,1],stand:[4,5],standard:[8,11],star:[17,19],stare:11,start:[5,6,7,8,9,11,13,17,19,25],state:[8,21],state_nam:5,statement:[3,5,15],stdout:[18,19],step:[3,6,8,11,14,19,20,21],stepper:15,still:[5,11,19],stop:11,stopiter:5,storag:[6,11],store:[6,13,19],stori:13,str:[1,5,19,22,23,24],straightforward:[5,7,9,15,19,21],stream:[6,18,19],stretch:11,string:[1,2,3,8,19,20,21,22,23,24],stringi:5,structur:[8,16,17,19,20,21,24],stuck:5,studi:5,stuff:[11,19],stuncon:[3,25],stununcon:[3,25],style:[0,4,19],sub:[10,16,25],subclass:8,subject:[16,20],subsequ:16,subset:[19,25],substitut:[5,11,19],subtract:6,subtyp:21,succ:[3,19,25],succe:19,success:9,suck:19,suffic:19,suffici:11,suffix:19,suggest:[4,5,11],suitabl:[3,4,6],sum:[3,7,8,12,13,14,17],sum_:[3,19],summand:6,sumtre:17,suppli:[11,22],support:[8,19,23,24],sure:16,suspect:2,svg:5,swaack:[3,12,14,15,19,20,25],swap:[3,6,7,8,9,11,13,14,15,16,17,18,20,25],swon:[3,7,8,13,17,19,20,25],swoncat:[7,8,9,13,17],swuncon:13,sym:5,symbol:[1,2,3,5,16,19,20,21,22],symboljoytyp:19,symmetr:[6,11,15],symmetri:[5,15],syntact:8,syntax:[8,24],sys:[18,19,24],system:[8,11,16],tabl:[5,19],tag:[5,19,25],tail:[11,19,21,24],tailrec:3,take:[3,5,6,8,9,11,13,15,16,19,24],talk:[8,11,19,24],target:20,tast:4,tbd:8,tear:13,technic:2,techniqu:[4,20],technolog:2,temporari:20,ten:6,term:[1,2,5,8,9,13,16,19,21,22,24,25],termin:[2,3,5,13],ternari:8,test:[2,3,13],text:[0,1,3,19],text_to_express:[8,18,22],textual:8,than:[0,3,5,6,7,8,9,13,16,17,19,24,25],thei:[2,5,6,7,8,11,13,15,16,19,20,22,24],them:[0,2,3,5,6,7,11,13,15,16,19,20,21,25],themselv:[16,19],theori:[2,3,13,16],therefor:7,thi:[0,1,2,3,4,5,6,7,8,9,12,13,15,16,17,19,20,21,22,23,24,25],thing:[2,7,11,13,16,19,20,22,24,25],think:[2,6,8,11,13,16,17,19],third:[3,7,8,11,25],thirti:6,those:[2,3,5,11,13,15,19,21,25],though:[6,16],thought:[8,16],thousand:6,thread:[2,16],three:[2,3,5,6,8,11,12,15,17,19,21],through:[1,6,8,17,19,20,24,25],thun:[2,3,4,10,13,16],thunder:8,thunk:16,time:[3,5,6,8,9,11,13,15,16,19,20],titl:19,to_check:5,to_set:11,todai:8,todo:[8,22],togeth:[7,8,16,19,21],token:22,toler:21,too:[5,13,19],tool:[8,19],tooo:19,top:[2,3,8,13,19,23,24],total:6,tower:19,trace:[0,8,12,13,15,20,21,24],traceback:19,traceprint:23,track:[12,19,20],tracker:0,transform:4,transit:5,translat:[4,12,19,21],trap:5,travers:[0,21],treasur:0,treat:[0,2,3,13,19,21],treatment:7,tree:[0,8,21],treegrind:21,treestep:[0,21],tri:6,triangl:16,triangular_numb:13,trick:[6,19],tricki:19,trobe:0,trove:0,truediv:25,truthi:[3,8,16,19],tuck:[3,8,19,25],tupl:[3,5,8,19,24],turn:[2,3,5,19,21],twice:[11,13],two:[0,2,3,6,8,9,11,12,13,15,16,17,18,19,20,21,24,25],txt:3,type:[0,1,4,8,11,13,16,21,22,23,24],typeerror:19,typeless:19,typic:[2,3,12,13],ulam:[0,15],unari:8,unarybuiltinwrapp:3,unbalanc:[11,22],unbound:25,unchang:11,uncompil:19,uncon:[3,7,8,11,13,17,20,25],under:[2,3,8,11],underli:[5,16,19],underscor:19,understand:[0,11],undistinguish:11,undocu:8,unfinish:5,unfortun:24,unicod:19,unif:[19,21],unifi:18,union:5,uniqu:[3,5,11,19],unit:[3,8,13,16,25],univers:[0,8,16,19],unlik:16,unnecessari:21,unnecesssari:19,unpack:[2,3,11,24],unpair:6,unquot:[8,15,17,22],unread:[0,15],unrol:5,unstack:19,unswon:[3,25],untangl:13,until:[5,7,16],unus:6,unusu:11,unwrap:5,updat:[0,18,21,25],uppercas:5,upward:16,usag:8,use:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,20,21,24],used:[0,3,4,8,11,13,15,16,19,20,22,24],useful:[0,16,19],user:17,uses:[2,3,5,6,13],using:[7,11,12,13,15,17,20,25],usual:[0,2,13],util:[0,3,14,18,19],valid:19,valu:[0,1,2,3,6,8,9,12,13,14,15,16,17,19,21,22,24,25],value_n:11,valueerror:[5,19,24],variabl:[19,21],variant:11,variat:[13,16,21],varieti:[4,8],variou:0,vener:24,verbos:4,veri:[0,1,4,5,8,11,15,24],versa:[2,19],version:[0,1,2,5,7,10,17,20,21],via:8,vice:[2,19],view:[11,21],viewer:[1,8,10,23],vii:21,visibl:19,von:[0,2,3,4,13],waaaai:5,wai:[0,2,3,4,5,6,8,13,14,15,16,19],wait:16,want:[2,3,6,7,9,11,13,19],warranti:[3,8],wash:8,wast:8,web:24,websit:[0,6],welcom:8,well:[0,4,8,9,11,19,22],went:19,were:[8,19,20],what:[2,3,4,5,8,11,13,16,17,19,23],whatev:[2,3,13,17,24],when:[6,7,8,11,13,16,19,20,22,24,25],where:[2,3,5,8,11,13,15,19,21,24],whether:[3,13],which:[0,1,3,5,6,8,9,11,13,15,16,17,19,20,22,24,25],whole:[2,3,6,13,17,19],whose:7,why:[9,16,17],wiki:11,wikipedia:[0,11,20],wildli:8,wind:8,wire:13,within:[8,11,14,21],without:[2,8,11,12,15,16,19],won:[11,19,24],word:[0,3,6,8,13,20],work:[0,3,5,6,7,8,9,11,12,13,15,16,17,20,21,24,25],worker:16,worri:16,worth:6,would:[2,6,7,8,9,11,13,16,19,20,24],wrap:[3,8],wrapper:19,write:[4,5,9,11,13,15,16,17,19,20,21,24],written:[0,1,9,11,14,19,24],wrong:2,wrote:19,xrang:19,yang:19,yeah:16,year:[8,19],yet:[11,16,19,20],yield:[2,3,13,19,24],yin:21,you:[0,2,3,5,6,7,8,10,11,12,13,14,15,16,17,19,20,23,24,25],your:[2,3,8,13,19],yourself:[5,8,11],zero:[3,5,11,13,16,17,19,22,24],zerodivisionerror:19,zip:[5,6,19],zip_:3,zipper:[0,21],zstr:20},titles:["Thun 0.4.1 Documentation","Joy Interpreter","Functions Grouped by, er, Function with Examples","Function Reference","Categorical Programming","\u2202RE","Developing a Program in Joy","Using <code class=\"docutils literal notranslate\"><span class=\"pre\">x</span></code> to Generate Values","Thun: Joy in Python","Newton\u2019s method","No Updates","Treating Trees I: Ordered Binary Trees","Quadratic formula","Recursion Combinators","Replacing Functions in the Dictionary","Square Spiral Example Joy Code","The Four Fundamental Operations of Definite Action","Treating Trees II: <code class=\"docutils literal notranslate\"><span class=\"pre\">treestep</span></code>","Type Checking","The Blissful Elegance of Typing Joy","Traversing Datastructures with Zippers","Essays about Programming in Joy","Parsing Text into Joy Expressions","Tracing Joy Execution","Stack or Quote or Sequence or List\u2026","Type Inference of Joy Expressions"],titleterms:{"\u03bb":5,"\u03d5":5,"boolean":15,"case":[9,11],"function":[2,3,5,8,9,11,13,14,16,17,19],"long":14,"new":11,"p\u00f6ial":19,"try":5,"void":2,"while":[2,16],Adding:11,Not:15,One:[7,11],The:[6,8,11,13,15,16,17,19],There:8,Using:7,With:[5,17],about:21,action:16,add:[2,11],adding:11,address:20,alphabet:5,altern:17,ana:13,analysi:6,anamorph:[2,13],app1:2,app2:2,app3:2,appendix:[11,13,19],appli:16,approxim:9,argument:19,auto:3,averag:2,base:[9,11],binari:[2,11,17],bliss:19,both:11,branch:[2,11,15,16],brzozowski:5,can:11,cata:13,catamorph:13,categor:4,chatter:2,check:18,child:11,choic:2,clear:2,cleav:[2,16],cmp:11,code:[0,8,11,15],combin:[2,11,13,19],comment:19,compact:5,compar:11,comparison:2,compil:[7,19],compile_:19,compos:19,comput:9,con:[2,19],concat:2,conclus:[13,15,19],consecut:9,continu:8,current:11,datastructur:[5,8,11,20],deal:19,decrement:15,defin:[11,17],definit:[12,16],delabel:19,delet:11,deriv:[5,12,13,17],design:13,determin:20,develop:6,diagram:5,dialect:0,dictionari:14,dip:[2,20],dipd:2,dipdd:2,direco:7,disenstacken:2,distinguish:19,div:2,doc_from_stack_effect:19,document:0,doe:11,down_to_zero:2,drive:5,drop:2,dup:[2,19],dupd:2,dupdip:2,effect:19,eleg:19,els:11,empti:11,enstacken:2,equal:11,essai:21,euler:[6,7],eval:8,even:7,exampl:[0,2,8,11,13,15,17,18],execut:23,explor:5,express:[5,8,22,25],extract:17,factori:13,fail:18,fibonacci:7,filter:6,find:[9,11,13],finish:16,finit:5,first:[2,6,15,16,19],five:7,flatten:2,flexibl:17,floordiv:2,form:15,formula:12,found:11,four:[13,16],fsm:5,fulmin:16,fun:13,fundament:16,further:6,gcd:2,gener:[3,5,6,7,9,15],genrec:2,get:[11,17],getitem:2,given:17,greater:11,group:2,handl:16,have:[11,17],help:2,highest:11,host:0,how:[6,7],hybrid:19,hylo:13,hylomorph:13,identifi:19,ift:[2,16],iii:19,implement:[5,19],increment:15,indic:0,infer:[19,25],inferenc:19,inform:0,infra:[2,20],integ:6,interest:7,interlud:11,intern:22,interpret:[1,8,19],item:20,iter:[6,11],joi:[0,1,3,6,8,13,15,19,20,21,22,23,24,25],join:16,just:6,kei:11,kind:16,languag:0,larger:5,least_fract:2,left:11,less:11,let:[5,6],letter:5,librari:[3,8,19],like:11,list:[2,24],literari:8,littl:6,logic:[2,19],loop:[2,8,16],lower:11,lshift:2,machin:5,make:[7,9],mani:6,map:[2,16],match:5,math:2,memoiz:5,method:9,min:2,miscellan:2,mod:2,modifi:19,modulu:2,more:11,most:11,mul:[2,19],multipl:[6,7,19],must:11,name:12,neg:[2,15],newton:9,next:9,node:11,non:11,now:11,nullari:2,nulli:5,number:[13,19],one:8,onli:8,oper:16,order:[11,17],origin:15,osdn:0,other:16,our:11,out:5,over:2,pack:6,pam:[2,16],para:13,paradigm:19,parallel:16,parameter:[11,17],pars:[2,22],parser:[8,22],part:19,pass:8,path:20,pattern:13,per:11,piec:15,pop:[2,19],popd:2,popop:2,pow:2,power:7,pred:2,predic:[6,9,11,15,17],pretty_print:23,primit:13,primrec:2,print:8,problem:[6,7],process:11,product:2,program:[4,6,12,17,21],progress:19,project:[0,6,7],pure:8,put:[11,12,15,17],python:[8,14,19],quadrat:12,quick:0,quot:[2,24],rang:[2,6,13],range_to_zero:2,read:8,recur:[9,11],recurs:[11,13,17],redefin:[11,17],refactor:[6,11],refer:3,regular:[5,8],reimplement:17,relabel:19,rem:2,remaind:2,remov:2,render:6,repl:8,replac:[11,14],repres:[5,19],represent:5,reset:7,rest:[2,19],revers:[2,5,18],right:[11,20],rightmost:11,roll:[2,19],rolldown:2,rollup:2,rshift:2,rule:[5,19],run:[2,7],second:[2,19],select:2,sequenc:[7,16,19,24],set:[9,11],shorter:14,should:8,shunt:2,simpl:19,simplest:6,size:[2,14],sourc:11,special:[13,19],spiral:15,sqr:[2,19],sqrt:[2,12],squar:15,stack:[2,8,19,24],start:0,state:5,step:[2,13,17],straightforward:12,stream:5,string:5,structur:11,style:8,sub:[2,11],subtyp:19,succ:2,sum:[2,6],swaack:2,swap:[2,19],swon:2,swoncat:2,symbol:[8,13],tabl:0,tail:13,take:2,term:[6,7,17],ternari:2,text:22,than:11,them:12,thi:11,third:[2,19],three:7,thun:[0,8],time:[2,7],togeth:[11,12,15,17],token:8,toler:9,trace:[14,23],traceprint:8,trampolin:5,translat:15,travers:[11,17,20],treat:[11,17],tree:[11,17,20],treegrind:17,treestep:17,triangular:13,truediv:2,truthi:2,tuck:2,turn:15,two:[5,7],type:[18,19,25],unari:2,unbound:19,uncon:[2,19],unif:18,unifi:19,unit:2,unnecessari:6,unquot:2,unstack:2,updat:[10,19],use:19,util:[23,24,25],valu:[7,11],variabl:12,variat:7,version:[6,11,14,19],view:8,vii:19,within:9,word:2,work:[18,19],write:12,xor:2,yin:19,zero:7,zip:2,zipper:20}})
\ No newline at end of file
1+Search.setIndex({docnames:["index","joy","lib","library","notebooks/Advent_of_Code_2017_December_1st","notebooks/Categorical","notebooks/Derivatives_of_Regular_Expressions","notebooks/Developing","notebooks/Generator_Programs","notebooks/Intro","notebooks/Newton-Raphson","notebooks/NoUpdates","notebooks/Ordered_Binary_Trees","notebooks/Quadratic","notebooks/Recursion_Combinators","notebooks/Replacing","notebooks/Square_Spiral","notebooks/The_Four_Operations","notebooks/Treestep","notebooks/TypeChecking","notebooks/Types","notebooks/Zipper","notebooks/index","parser","pretty","stack","types"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":2,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["index.rst","joy.rst","lib.rst","library.rst","notebooks/Advent_of_Code_2017_December_1st.rst","notebooks/Categorical.rst","notebooks/Derivatives_of_Regular_Expressions.rst","notebooks/Developing.rst","notebooks/Generator_Programs.rst","notebooks/Intro.rst","notebooks/Newton-Raphson.rst","notebooks/NoUpdates.rst","notebooks/Ordered_Binary_Trees.rst","notebooks/Quadratic.rst","notebooks/Recursion_Combinators.rst","notebooks/Replacing.rst","notebooks/Square_Spiral.rst","notebooks/The_Four_Operations.rst","notebooks/Treestep.rst","notebooks/TypeChecking.rst","notebooks/Types.rst","notebooks/Zipper.rst","notebooks/index.rst","parser.rst","pretty.rst","stack.rst","types.rst"],objects:{"joy.joy":{joy:[1,1,1,""],repl:[1,1,1,""],run:[1,1,1,""]},"joy.library":{"void":[3,1,1,""],BinaryBuiltinWrapper:[3,1,1,""],DefinitionWrapper:[3,2,1,""],FunctionWrapper:[3,1,1,""],SimpleFunctionWrapper:[3,1,1,""],UnaryBuiltinWrapper:[3,1,1,""],add_aliases:[3,1,1,""],app1:[3,1,1,""],app2:[3,1,1,""],app3:[3,1,1,""],b:[3,1,1,""],branch:[3,1,1,""],choice:[3,1,1,""],clear:[3,1,1,""],cmp_:[3,1,1,""],concat_:[3,1,1,""],cond:[3,1,1,""],dip:[3,1,1,""],dipd:[3,1,1,""],dipdd:[3,1,1,""],disenstacken:[3,1,1,""],divmod_:[3,1,1,""],drop:[3,1,1,""],dupdip:[3,1,1,""],floor:[3,1,1,""],genrec:[3,1,1,""],getitem:[3,1,1,""],help_:[3,1,1,""],i:[3,1,1,""],id_:[3,1,1,""],infra:[3,1,1,""],initialize:[3,1,1,""],inscribe:[3,1,1,""],inscribe_:[3,1,1,""],loop:[3,1,1,""],map_:[3,1,1,""],max_:[3,1,1,""],min_:[3,1,1,""],parse:[3,1,1,""],pm:[3,1,1,""],pred:[3,1,1,""],primrec:[3,1,1,""],remove:[3,1,1,""],reverse:[3,1,1,""],select:[3,1,1,""],sharing:[3,1,1,""],shunt:[3,1,1,""],sort_:[3,1,1,""],sqrt:[3,1,1,""],step:[3,1,1,""],succ:[3,1,1,""],sum_:[3,1,1,""],take:[3,1,1,""],times:[3,1,1,""],unique:[3,1,1,""],warranty:[3,1,1,""],words:[3,1,1,""],x:[3,1,1,""],zip_:[3,1,1,""]},"joy.library.DefinitionWrapper":{add_def:[3,3,1,""],add_definitions:[3,3,1,""],parse_definition:[3,3,1,""]},"joy.parser":{ParseError:[23,4,1,""],Symbol:[23,2,1,""],text_to_expression:[23,1,1,""]},"joy.utils":{generated_library:[3,0,0,"-"],pretty_print:[24,0,0,"-"],stack:[25,0,0,"-"]},"joy.utils.generated_library":{ccons:[3,1,1,""],cons:[3,1,1,""],dup:[3,1,1,""],dupd:[3,1,1,""],dupdd:[3,1,1,""],first:[3,1,1,""],first_two:[3,1,1,""],fourth:[3,1,1,""],over:[3,1,1,""],pop:[3,1,1,""],popd:[3,1,1,""],popdd:[3,1,1,""],popop:[3,1,1,""],popopd:[3,1,1,""],popopdd:[3,1,1,""],rest:[3,1,1,""],rolldown:[3,1,1,""],rollup:[3,1,1,""],rrest:[3,1,1,""],second:[3,1,1,""],stack:[3,1,1,""],stuncons:[3,1,1,""],stununcons:[3,1,1,""],swaack:[3,1,1,""],swap:[3,1,1,""],swons:[3,1,1,""],third:[3,1,1,""],tuck:[3,1,1,""],uncons:[3,1,1,""],unit:[3,1,1,""],unswons:[3,1,1,""]},"joy.utils.pretty_print":{TracePrinter:[24,2,1,""],trace:[24,1,1,""]},"joy.utils.pretty_print.TracePrinter":{go:[24,3,1,""],viewer:[24,3,1,""]},"joy.utils.stack":{concat:[25,1,1,""],expression_to_string:[25,1,1,""],iter_stack:[25,1,1,""],list_to_stack:[25,1,1,""],pick:[25,1,1,""],stack_to_string:[25,1,1,""]},joy:{joy:[1,0,0,"-"],library:[3,0,0,"-"],parser:[23,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","exception","Python exception"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:exception"},terms:{"05s":6,"0b11100111011011":7,"1st":4,"23rd":20,"4ac":13,"5bkei":12,"9a9d60354c35":20,"\u03b4":6,"\u03b5":10,"abstract":[9,12],"boolean":[2,3,9,12,17],"break":[6,9,16,20],"byte":[6,7],"case":[2,3,14,17,18,20,25],"char":6,"class":[3,6,9,20,23,24,25],"const":16,"default":[3,8,12,25],"export":[3,23],"final":[2,12,14,16],"float":[9,20,21,23],"function":[0,1,4,5,7,8,11,13,16,19,21,22,23,24,25,26],"g\u00e9rard":21,"goto":6,"import":[2,4,6,7,8,10,12,13,14,15,16,18,19,20,21],"int":[6,8,9,14,16,20,21,23,25],"long":[12,16,20,22],"new":[0,2,3,6,8,9,11,14,15,16,20],"p\u00f6ial":22,"p\u00f6ial06typingtool":20,"public":11,"return":[1,3,6,7,9,12,14,15,17,18,20,23,24,25],"short":16,"static":[2,11],"super":20,"switch":[2,20],"throw":[12,26],"true":[2,3,6,7,14,16,17,20],"try":[8,10,13,14,16,18,19,20,22],"void":[0,3,16],"while":[3,6,9,12,20,23,25],AND:[6,20],Adding:[9,15,22],And:[4,6,7,8,10,12,14,16,17,20,21,25],But:[0,5,7,8,9,12,15,16,20],CPS:9,For:[0,2,3,4,12,14,15,20,22,25],Its:3,NOT:6,Not:20,One:[2,9,17,20,22],REs:6,TOS:[2,3],That:[7,12],The:[0,1,2,3,4,5,6,8,10,11,13,21,22,23,24,25,26],Then:[2,3,12,13,14,20],There:[6,13,14,16,17,18,20,25],These:[17,20,22,25],Use:[3,10,14],Used:17,Using:[0,10,12,22],With:[4,10,14,16,20,22,26],_1000:20,__add__:20,__call__:6,__class__:20,__eq__:20,__ge__:20,__hash__:20,__init__:[6,20],__main__:20,__radd__:20,__repr__:20,__str__:24,_and:6,_compaction_rul:6,_con:6,_dictionari:20,_ge:20,_infer:20,_interpret:20,_log:20,_log_it:20,_names_for:20,_or:6,_spn_e:16,_spn_p:16,_spn_t:16,_templat:6,_to_str:20,_tree_add_:12,_tree_add_e:[12,26],_tree_add_p:12,_tree_add_r:12,_tree_add_t:12,_tree_delete_:12,_tree_delete_clear_stuff:[12,26],_tree_delete_del:12,_tree_delete_r0:[12,26],_tree_delete_r1:12,_tree_delete_rightmost:12,_tree_delete_w:12,_tree_get_:[12,26],_tree_get_p:12,_tree_get_r:12,_tree_get_t:12,_tree_iter_order_curr:12,_tree_iter_order_left:12,_tree_iter_order_r:12,_tree_iter_order_right:12,_tree_t:12,_treestep_0:18,_treestep_1:18,_uniqu:20,_within_b:10,_within_p:10,_within_r:10,a10001:20,a10002:20,a10003:20,a10004:20,a_i:10,abbrevi:18,abl:[6,17,20,26],about:[0,9,12,17,20,21,25],abov:[0,6,7,10,12,14,17,20],abs:[0,10,16],absolut:9,accept:[0,1,2,3,6,7,8,9,12,13,15,16,17,18,20,21],accord:6,accordingli:[12,17],accumul:7,act:[6,26],action:[0,9,15,16,20,21,22],actual:[2,7,9,12,17,20],adapt:[16,22],add:[3,4,6,7,8,9,15,20,24,26],add_alias:3,add_def:3,add_definit:[3,12,18],add_if_match:4,added:[5,12],adding:[11,20],addit:[0,2,3,7,9,14,15,18],address:22,adjust:12,advantag:20,advent:4,affect:[3,17],after:[4,6,7,8,9,14,17,20,26],afterward:9,again:[2,3,7,9,12,14,20],against:20,aggreg:21,ahead:20,aka:[6,9,21,26],albrecht:0,algorithm:[6,9,20],alia:3,alias:[3,9],align:[9,24],all:[3,4,6,7,8,9,12,14,15,16,17,18,20,24],alloc:20,allow:[11,12,17],almost:12,along:[6,9,14,20],alphabet:[3,22],alreadi:[6,10,15,20,21],also:[0,6,7,9,12,17,20,24,25],alter:[6,20],altern:[5,20],although:[4,5,12],altogeth:8,alwai:[7,11,14,17],amend:17,among:20,amort:12,analysi:[5,22],anamorph:[9,22],ani:[0,5,6,7,9,11,12,16,17,20,21,23],annual:9,anonym:12,anoth:[4,6,12,17,20,25,26],anyhow:[17,20],anyjoytyp:20,anymor:20,anystarjoytyp:20,anyth:[2,3,6,9,20,26],aoc2017:4,apart:20,api:11,app1:3,app2:[3,9,13,14,15,17],app3:[3,17],app:9,appear:[2,5,6,7,12],append:20,appendix:22,appli:[2,3,7,8,12,14,16,20],applic:8,approach:7,appropri:6,approxim:22,archiv:0,aren:21,arg:[2,3,16],argument:[2,3,9,10,13,14,16,22,24,25],arithmet:2,ariti:[2,17],around:[7,20,23,25],arrang:[16,18],arriv:[8,18],arrow:6,articl:[0,5,8,14],ascii:6,ascii_lowercas:6,ask:[5,8,20],aspect:0,assembl:[6,16],assert:[6,20],assign:[17,25],associ:12,assum:[4,10],asterisk:18,asterix:[20,26],asyncron:17,attack:9,attempt:[0,1,20],attribut:3,attributeerror:20,author:20,auto:[0,20,26],automat:[5,17,20],auxiliari:[6,18],avail:[0,20,26],averag:[9,15],avoid:12,awai:[12,20],awar:2,awkward:[12,14,20],azur:22,back:[3,12,20],backtrack:26,backward:[11,12,13,18],bad:20,bag:9,banana:14,bar:17,barb:14,base:[0,2,3,11,14,18,20],basic:[2,3,4,9,12],basicconfig:[19,20],becaas:6,becaus:[2,3,4,6,9,12,17,18,20,21,25],becom:[0,4,12,16,18,25],becuas:20,been:[6,10,11,12,20,21],befor:[6,8,9,12],begin:[12,18],behavior:[11,18,26],behaviour:[0,1,20],behind:17,being:[0,17],below:[2,3,6,7,8,12,16,20,21],bespok:9,best:0,better:[7,12,14,20],between:[0,7],beyond:8,biannual:9,bin:6,binari:[0,8,9,22],binary_search_tre:12,binarybuiltinwrapp:3,bind:9,bingo:21,bit:[6,7,8,12,20],blank:23,bliss:[0,22],block:7,bodi:[2,3,6,9,12,17],body_text:3,booktitl:20,bool:[14,20,26],borrow:[9,20],both:[2,7,9,13,14,15,16,17,20,25],bottom:8,bounce_to:6,bracket:[9,20,23],branch:[3,4,6,7,8,14,20,22,26],branch_fals:20,branch_tru:20,breakpoint:9,brief:4,bring:[7,9,20],bruijn:20,brutal:17,brzozowski:[20,22],brzozowskian:6,btree:[12,18],buck:12,bug:[0,9],build:[8,9,13,14,16,21,25],built:[13,20],bundl:[2,3,14],burgeon:9,calculu:5,call:[1,2,6,9,11,12,14,17,20,24,25],caller:[12,20],can:[0,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,20,21,22,23,25,26],cancel:17,cannot:[19,20,23],captur:9,card:9,care:[7,25],carefulli:21,carri:[4,8,12],cartesian:5,catamorph:22,categor:[0,22],categori:[5,17],ccc:5,ccon:[3,12,19,20,26],cell:[14,20],certain:[9,25],certainli:12,chain:[3,17],challeng:22,chang:[2,11,12,16,20,21],charact:[6,21],chat:9,chatter:[0,20],check:[0,8,10,20,22],child:18,choic:[3,14],choos:11,chop:13,chose:6,cinf:12,circl:6,circuit:[5,16],circular:4,cite_not:12,classmethod:3,claus:[3,20],clean:20,clear:[3,7,9],clear_stuff:12,cleav:[4,9,13,15],close:[0,1,5],clunki:[7,20],clv:17,cmp:[3,18,22],cmp_:3,code:[1,5,6,13,14,17,20,22,26],codireco:[8,10,16],collaps:14,collect:[5,6,8,9,20],combin:[0,3,7,8,9,10,13,16,17,18,21,22,24,26],combinatorjoytyp:20,come:[9,12,20],command:[4,9,12,20],comment:17,common:[2,7,17],compar:[3,5,6,16,20],comparison:[0,12],compat:17,compel:5,compil:[2,5,6,9,12,15,17,22,26],complement:6,complet:5,complex:[3,17,20,21,26],complic:20,compos:[6,26],composit:20,compostit:20,compound:12,comput:[2,5,6,7,9,13,16,17,20,26],con:[3,6,7,8,9,10,12,13,14,16,17,18,21,25,26],conal:[5,17],concat:[3,4,8,9,17,18,20,25],concat_:3,concaten:[0,6],concatin:[0,3,6,25],concern:17,conclus:22,concurr:2,cond:[3,12],condit:[3,9],condition:16,confer:20,conflict:[12,20],consecut:22,consid:[6,7,8,12,14,18,20,21],consist:[2,8,9,17,18],constant:12,constitu:14,constraint:16,construct:[0,16,17,20],consum:[16,17,20],contain:[0,2,3,6,8,9,14,16,20,23],content:20,context:2,conting:12,continu:[0,6,14,20,21],control:9,conveni:[5,17,20],convent:17,convers:20,convert:[14,15,18,20,23,25],cool:12,coordin:[0,16],copi:[2,3,4,7,12,14,16,17,18,19,22],copyright:9,correspond:[5,17],could:[2,5,6,7,9,11,12,17,20,21],couldn:17,count:[3,20],counter:[7,20],coupl:18,cours:[7,12,20],cout:16,cover:20,cpu:17,crack:12,crash:12,creat:[0,2,3,4,7,10,12,17,20],creativ:20,crude:[12,20,23],cruft:20,curent:26,current:[2,3,9,14,16,17,18,20,21,24,26],curri:6,custom:11,cycl:[7,8],cython:9,d010101:6,d0101:6,d01:6,d10:6,d_compact:6,dai:9,data:[2,3,6,14],datastructur:[0,2,14,20,22,23,25],datatyp:25,ddididi:21,deal:[0,4,6,12,17],dealt:20,debugg:20,decemb:4,decid:12,declar:20,decor:3,decoupl:14,decrement:[0,3],deduc:[7,20],deeper:0,deepli:5,def:[3,6,9,14,15,20,25],defaultdict:[6,20],defi:3,defin:[2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,20,21,22],definit:[0,2,3,7,8,9,11,12,14,16,18,20,22,26],definitionwrapp:[3,12,14,18],defint:17,del:19,deleg:9,delet:22,deliber:20,demo:20,demonstr:5,depend:[3,12,14,17],deposit:18,depth:[20,26],dequot:[4,14],der:12,deriv:[2,3,4,7,9,10,12,20,22],derv:6,describ:[3,5,6,12,14,17,18,20,23],descript:[7,9],descriptor:20,design:[2,3,12,17,22],desir:[9,18],destin:6,destruct:12,detail:[9,12,20],detect:[6,8,12,14,20],determin:22,develop:[0,8,9,20,22],diagram:7,dialect:1,dict:[1,3,6,20,24],dictionari:[0,1,3,9,20,22,24],did:20,differ:[0,5,7,10,12,13,14,17,25],differenti:5,difficult:20,difficulti:17,dig:[12,21],digit:[4,7],digraph:6,dinfrirst:[9,16,20,26],dip:[0,3,7,8,9,10,12,13,14,15,16,17,18,20,22,26],dipd:[3,8,9,12,13,14,16,17,20,21,26],dipdd:[3,12],direco:22,direct:9,directli:[7,17,18,20,25],disappear:[2,6,20],discard:[3,8,10,12,14],disciplin:12,disctionari:1,disenstacken:[3,9],disk:9,displac:2,displai:20,distiguish:20,distribut:17,ditch:12,div:[3,9,20,26],dive:18,divis:[12,20],divmod:[3,26],divmod_:[3,20],doc:[2,3,9,20],doc_from_stack_effect:19,docstr:20,document:[20,22,23,25],doe:[0,1,3,5,6,8,9,15,17,20,22,24,26],doesn:[4,7,11,12,16,17,18,20,25],doing:[5,7,9,17,20,21],domain:[5,20],don:[6,7,9,12,20],done:[2,7,9,11,20],dooooc:20,door:9,dot:[6,24],doubl:[3,6,7,9,20],doublecircl:6,down:[2,6,10,14,21,26],down_to_zero:9,dozen:9,draft:[5,11],dream:9,drive:[8,10],driven:7,driver:[6,8],drop:[3,4,12],dudipd:9,due:[4,20],dup:[3,4,7,8,9,10,12,13,14,16,17,19,21,25,26],dupd:[3,20,26],dupdd:[3,26],dupdip:[3,7,12,13,14,16],duplic:[3,12,14],durat:2,dure:[2,14],each:[2,3,4,5,6,7,9,14,15,16,17,18,20,24,26],easi:[0,12,16,18,20,21],easier:[3,4,12,17],easili:5,eat:6,edit:22,effect:[2,3,6,9,17,21,22,26],effici:[8,15,21],efg:20,either:[1,2,3,6,12,14,20],elabor:20,eleg:[0,6,9,12,17,22],element:[2,3],elif:20,elimin:[6,20],elliott:[5,17],els:[2,3,4,6,14,16,17,20],else_:20,embed:[5,12,21],emit:20,empti:[3,6,9,18,20,25,26],encapsul:9,enclos:9,encod:8,encount:20,end:[6,7,12,14,18,20,25],endless:8,enforc:[2,9],engend:9,enough:[6,9,14,24,26],enstacken:[8,9,20],enter:[3,9],enter_guard:20,entir:25,entri:[3,21,24],enumer:20,epsilon:10,equal:[3,7,18,25],equat:[9,10],equival:17,ergo:[6,12],err:[12,19],error:[9,20,23],essai:0,establish:20,etc:[3,18,20,21,23],euler:22,euro:20,eval:[0,20],evalu:[1,2,3,4,9,10,12,13,14,15,17,18,20,24],event:17,eventu:[17,20],ever:20,everi:[1,8,17],everybodi:17,everyth:[3,6,12,13,17,20],evolv:11,examin:14,exampl:[3,6,7,20,22,23,25,26],exce:8,except:[6,9,12,19,20,23],execut:[0,1,2,3,9,14,15,17,18,20,21,25,26],exend:20,exercis:[6,12],exist:[5,12,20],expand:12,expect:[2,3,17,18,20,25],experi:[9,18],explain:20,explan:9,explor:[9,20],express:[0,1,2,3,5,12,14,15,16,20,21,22,24,25],expression_to_str:[20,25],extend:20,extra:[4,7,8],extract:[12,13,22],extrem:9,extrememli:9,f_g:20,f_in:20,f_out:20,f_python:20,facet:0,facil:9,fact:23,factor:[2,7,9,12,16,20],factori:[3,22],fail:[2,3,12,22,23],fail_fail:3,fairli:20,fake:6,fall:20,fals:[2,3,6,7,14,16,17,20],falsei:20,familiar:[0,16],far:[10,12,14,20,26],fascin:0,favorit:17,fear:[12,20],few:[7,9,10,13,17,20],fewer:[3,9],fg_in:20,fg_out:20,fib:8,fib_gen:8,fibonacci:22,figur:[2,3,12,14,20],file:16,filter:12,fin:7,find:[2,3,4,6,7,8,17,18,20,22,26],finder:10,fine:[0,6,7,12,20,26],finite_state_machin:6,first:[3,4,6,8,9,10,12,13,14,15,18,21,22,26],first_two:[3,12,26],fit:[7,9],five:[7,9,22],fix:[2,3,6,14,20],fixm:[6,20],flag:[17,20],flatten:[9,18,20],flesh:6,flexibl:22,floatjoytyp:20,floatstarjoytyp:20,floor:3,floordiv:[7,26],flow:9,follow:[0,2,3,6,9,11,14,17,18,20,21],foo:[9,11,12,17,20],foo_ii:11,fork:17,form:[2,3,5,6,7,8,14,18,20,22,25],forman:9,format:[19,20,22,24],formula:[0,7,22],forth:[4,9,20],forum:0,forward:20,found:9,four:[0,2,3,7,8,9,12,16,22],fourteen:7,fourth:[2,3,4,12,14,26],frac:[10,13],fractal:9,fraction0:9,fraction:[2,9],frame:14,framework:9,free:[5,9,12],freeli:2,from:[0,1,2,3,4,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,25],from_:6,front:[2,3,14],frozenset:6,ftw:[0,22],fulin:17,full:7,fun:[6,22],func:20,functionjoytyp:20,functionwrapp:3,functool:6,fundament:[0,22],funtion:12,further:[10,20,22],futur:17,g_in:20,g_out:20,garbag:9,gari:12,gcd:9,gener:[0,2,5,14,17,20,22,25,26],generated_librari:3,genrec:[3,9,12,14,17,18,20],geometr:7,get:[2,5,6,7,8,9,13,14,20,22],getch:6,getitem:3,getrecursionlimit:25,getsourc:9,ghc:5,give:[5,7,12,14,16,18,20,25],given:[2,3,4,7,8,10,12,14,16,17,20,21,22],global:[19,20],glue:9,goe:26,going:[6,12,13,16,17,18,20,21],good:[7,12,20],grab:20,grammar:23,grand:9,graph:17,graphic:6,graphviz:6,great:[0,4,9,20,22],greater:25,grind:20,group:0,grow:6,gsra:10,guard:[12,20],had:[6,7,21],haiku:9,half:[7,20,21],half_of_s:4,halfwai:4,hallmark:17,hand:[6,9,15,20,22],handi:[10,20],handl:[12,20,25,26],happen:[9,20],happi:6,hard:[6,20,21],hardwar:5,has:[0,2,3,6,8,9,10,11,12,14,17,20,21,25],hasattr:20,hash:20,haskel:5,have:[2,3,4,6,7,8,9,10,11,14,15,16,17,20,21,22,25,26],head:25,heh:20,help:[0,9,12,14,16,20],help_:3,helper:[3,6],herd:9,here:[0,6,7,8,12,16,18,20,21,26],heurist:4,hide:12,hierarchi:20,higher:[6,9,12,20],highli:9,hij:6,histori:[20,24],hit:6,hmm:[6,12],hoist:3,hold:[7,20],hood:12,hope:[0,7,9,22],hopefulli:14,host:22,how:[0,5,6,10,12,14,16,20,21,22],howev:[14,15,17,20],html:[2,3,8,13,14,22],http:[12,26],huet:21,huge:12,hugh:[10,18],human:9,hybrid:[16,26],hylomorph:22,hypothet:2,id_:3,idea:[5,7,9,20],ident:[3,6,14,20,26],if_not_empti:12,ift:[0,3,4,12,14,16,18,20,26],ignor:[1,3,12,20],iii:22,illustr:[6,14],imagin:[6,17,21],imap:20,imit:[6,18],immedi:[6,14],immut:[6,9,12],imper:14,implement:[0,1,2,3,5,9,11,12,14,15,17,22,26],implementaion:17,implicit:9,improv:20,includ:[5,12,17,18,20,26],inclus:7,incom:25,incompat:11,incorpor:13,increas:7,increment:[0,3,5,7,11,17],index:[0,9,20,25],indexerror:25,indic:[17,18,20,26],ineffici:20,infer:[0,19],inferenc:26,info:[19,20],inform:[3,6,20,26],infra:[3,8,9,12,13,15,16,17,18,20,22,26],infrastructur:3,initi:[2,3,6,9,10,12,20],inlin:12,inner:20,inproceed:20,input:[1,4,10,17,19,20],input_:6,inscrib:3,inscribe_:3,insert:20,insight:14,inspect:9,inspect_stack:20,instal:0,instanc:20,instanti:[5,24],instead:[6,7,8,12,14,16,20,21,25,26],instruct:6,integ:[0,2,3,4,9,14,16,18,20,23],integr:3,intend:[0,9],interact:[9,22],interest:[0,7,12,20,22],interfer:17,interlud:22,intermedi:14,intern:[0,20,24,25],interpret:[0,5,11,15,23,24,26],interrupt:9,intersect:6,interspers:17,interv:[5,7],intjoytyp:20,introduc:11,introduct:0,intstarjoytyp:20,intuit:20,invari:3,invent:20,involv:20,ipf:9,ipython:20,isinst:[6,20],isn:[6,12,21],issubclass:20,item:[2,3,4,9,12,14,17,18,20,22,25],iter:[1,3,6,9,14,17,18,20,22,25],iter_stack:[15,25],iteritem:[6,20],itertool:[6,20],its:[0,1,2,3,5,7,9,12,14,16,17,18,20,25],itself:[0,2,9,12,17,20],j05cmp:[2,3,14],jaanu:20,jmp:6,job:[17,22],john:[10,18],joi:[2,5,11,12,13,15,17,19],join:[6,20],joypi:[21,26],joytypeerror:19,jump:6,jump_from:6,junk:20,jupyt:22,just:[0,2,3,4,6,8,9,11,12,14,16,17,18,20,21,24],juxtaposit:17,keep:[6,12,13,17,20,21],kei:[6,18,22],kevin:0,key_n:12,keyerror:[6,12,20],kind:[0,2,5,9,12,14,16,18,20,26],kinda:20,kleen:[18,20],kleenestar:20,kleffner:20,know:[7,12,20],knowledg:20,known:[5,17],kstar:6,l_kei:12,l_left:12,l_right:12,l_valu:12,label:[6,20],lambda:[5,6,20],languag:[3,5,6,9,11,12,15,20],larg:[6,20],larger:[22,25],largest:3,last:[4,7,12,14,20],lastli:8,later:[6,9,16,18,20],law:2,layout:[0,16],lazi:20,lazili:10,lcm:7,lead:[6,9,20],leaf:12,lean:9,learn:0,least:[2,7,14,20,25],least_fract:9,leav:[3,7,16,17],left:[6,9,13,14,17,18,20,21,24,25],leftov:14,legend:6,legibl:[0,16],len:[6,20],length:[3,7,25],lens:14,less:[7,8,9,14,20,25],let:[4,8,10,12,13,14,16,18,20,21,22],letter:20,level:[5,6,12,19,20],librari:[0,6,15],like:[0,2,3,6,7,9,16,17,18,20,22,23,24,26],limit:[20,26],line:[3,9,12,13,20,24,26],linear:25,link:[0,6,20],linux:0,list:[0,3,4,6,7,9,10,12,14,17,18,20,21,24],list_to_stack:[20,25],liter:[1,12,18,20,21,23],literatur:20,littl:[0,6,8,12,16,17,20,22],live:22,lkei:18,load:[7,9],local:20,locat:2,locu:24,log:[19,20],log_2:12,logic:[0,7,16,22],longer:[12,20],look:[1,6,8,9,10,12,13,16,17,20],lookup:9,loop:[0,1,3,6,7,20,22,26],lose:20,lot:[6,9,12,20,21],love:7,low:[5,6],lower:7,lowercas:[6,20],lowest:12,lshift:26,machin:[0,22],machineri:[12,20],macro:9,made:[0,9,17,20,21],magic:20,mai:[2,14,17,26],mail:0,main:[0,3,4,9,13,16,17,20,21],mainloop:11,maintain:21,major:11,make:[2,3,4,5,7,9,12,14,15,16,17,18,20,21,22],make_gener:[10,16],make_graph:6,manfr:[0,2,3,5,14],mani:[0,6,9,20],manipul:20,manner:13,map:[1,3,6,7,9,11,14,18,20,24],map_:3,marker:9,mask:[7,8,16],match:[0,1,4,20,22],materi:0,math:[0,9,10,12,13,20],mathemat:9,matter:[4,7,10,12,18],max_:3,maximum:3,mayb:[12,20],mean:[5,7,9,10,12,14,18,20,25],meant:[9,12,14,18],mem:6,member:[2,3,14],memo:6,mental:9,mention:2,mercuri:0,mess:20,messag:[19,20],meta:[9,12,15],meta_compos:20,method:[0,3,9,20,22,24],midpoint:7,might:[0,4,5,6,8,12,16,20],mike:12,million:8,min_:3,mind:20,minimum:3,minor:12,minu:3,mirror:0,miscellan:0,mismatch:20,mix:[9,20],mnemon:4,mod:3,mode:20,model:[5,9],modern:0,modif:[8,20],modifi:[9,12,21],modul:[0,1,3,9,20,23],modulo:20,modulu:[9,26],moment:20,month:9,more:[0,3,5,6,7,8,9,10,14,15,17,18,20,23,25,26],most:[6,20,26],mostli:0,move:[4,6,12],movement:2,much:[6,7,8,12,14,20],muck:12,mul:[3,9,13,19,21,24,26],multi:3,multipl:[22,26],multipli:3,must:[2,3,7,11,14,17,18,20,23],myself:20,n10001:20,n10002:20,n10003:20,n1001:20,n1002:20,n1003:20,name:[1,3,4,6,9,11,12,14,20,21,22,23,24,25,26],narr:20,natur:[6,7,8,12,20],navig:21,nearli:20,neat:12,neato:20,necessarili:20,need:[2,3,4,7,8,10,11,12,14,16,17,20],neg:[3,13,26],neither:[17,20],ness:6,nest:[3,9,12,21],net:26,network:9,never:[6,11,14],new_def:20,new_f:20,new_fo:20,new_kei:12,new_valu:12,newton:[0,22],next:[0,6,7,16,17,18,20,22,26],nice:[0,4,6,14,25],niether:2,node:[6,18,22],node_kei:12,node_valu:12,non:[6,18,20],none:[1,3,20],nope:18,nor:6,normal:17,notat:[0,9,12,16],note:[2,6,7,10,12,14,17,20,25],notebook:[7,8,9,20,21,22],notebook_preambl:[2,4,7,8,10,12,13,14,15,16,18,20,21],noth:[2,12,17],notic:7,now:[3,4,6,7,8,9,14,15,18,20,22],nth:[3,25],nullari:[9,12,16,17,20,26],number:[0,1,2,3,7,8,10,16,17,25,26],numberjoytyp:20,numberstarjoytyp:20,numer:20,object:[6,20,23],observ:7,obviou:8,obvious:20,occur:12,odd:[7,8],off:[2,3,7,8,13,16,20,21],often:[6,17],old:[2,15],old_k:12,old_kei:12,old_valu:12,omg:6,omit:[14,20,23],onc:[3,6,11,12],one:[0,2,3,4,6,7,8,12,14,16,17,18,20,24,25,26],ones:[6,8,20],onli:[2,3,4,6,7,12,14,16,17,20,21,25],onto:[1,2,3,9,14,25],open:[9,20],oper:[0,3,6,9,12,14,22,25],oppos:[4,20],optim:12,option:[1,9,12,20,25],orchestr:17,order:[0,2,3,4,9,14,17,19,20,22,25],org:[0,12],origin:[0,1,2,3,4,12,21,22],osdn:26,other:[0,2,3,5,6,9,12,14,16,18,20,25],otherwis:[3,6,7,8,12,18,20],our:[4,6,7,8,9,10,14,16,18,20],out:[2,3,5,7,8,9,10,12,13,14,16,17,20,21,22],outcom:18,outlin:6,output:[6,10,14,17,19,20,26],outsid:5,over:[3,4,5,7,8,9,10,12,13,17,18,20,22,26],overhaul:20,overview:[3,20],own:[12,20],pack:25,packag:[0,9],page:[0,12,20,25],pair:[0,2,3,4,7,8,12,16,20],pair_up:4,palidrom:7,palindrom:7,pam:9,paper:[5,9,14,17,21],paradigm:22,parallel:[2,22],paramet:[1,2,3,14,15,23,24,25],parameter:22,paramorph:14,parenthes:[12,25],pariti:8,pars:[0,3,6,9],parse_definit:3,parseerror:23,parser:[0,19,20],part:[2,3,10,14,18,22],partial:[6,20],particular:21,pass:[0,6,12,20,24],patch:6,path:[6,16,20,22],pattern:[6,7,17,18,22],pe1:[7,8],pe2:8,pearl:21,pend:[3,9,14,20,21,24],peopl:22,per:[9,18],perfectli:17,perform:[6,17,20],perhap:8,period:9,permit:[17,20,25],permut:20,persist:[3,12],phase:2,phi:6,phrase:16,pick:[7,8,17,25],pickl:9,pictur:12,piec:[14,22],pip:0,place:[3,7,9,20],plai:0,plu:3,plug:[8,14,18],point:[5,6,9,12,14,16,17],pointless:2,pool:17,pop:[0,3,4,6,7,8,9,12,14,15,16,18,19,25,26],popd:[3,9,10,12,15,17,20,26],popdd:[3,8,13,20,26],popop:[3,4,7,8,9,10,12,18,20,26],popopd:[3,26],popopdd:[3,26],posit:[3,7,9,14],possibilit:12,possibl:[12,18,20,22],post:9,poswrd:20,potenti:17,pow:26,power:[9,20],pprint:6,pragmat:7,preambl:10,preceed:17,precis:[0,1],pred:[3,20,26],predecessor:3,predic:[2,3,6,8,14,17],prefix:[20,24],preliminari:6,present:20,preserv:[5,18],pretti:[10,12,13,17,18,20,24,25],pretty_print:0,previou:[9,17],prime:10,primit:[2,3,20,22],primrec:[3,8,9,10,14],print:[0,1,2,3,6,19,20,24,25],probabl:[4,8,9,12,20],problem:[9,16,20,22],proc_curr:12,proc_left:12,proc_right:12,proce:[4,7,26],process:[6,9,18,20,24],produc:[3,4,7,12,14,18,20],product:[6,8,9,19,20],program:[0,2,3,4,8,9,10,12,14,16,17,20,21],programm:[17,20],progress:17,project:[22,26],prolog:20,promis:17,prompt:9,proper:[2,3,14,17,26],properti:0,provid:[0,3,5,9,17,20,26],pseudo:16,pun:[0,9],punctuat:20,pure:[0,6],puriti:9,purpos:9,push:[2,3,9,14,21,25],put:[1,2,8,9,17,20,22,25],puzzl:4,pypi:0,python3:9,python:[0,2,3,6,12,14,17,21,22,23,25,26],quadrat:[0,22],quasi:16,queri:[12,18],query_kei:18,queu:14,quit:[0,18],quot:[0,3,8,9,12,13,14,16,17,18,20,21,24],quotat:[2,3,14],quotient:3,r_kei:12,r_left:12,r_right:12,r_valu:12,rais:[6,12,20,23,25],rang:[6,9,20],range_revers:14,range_to_zero:9,ranger:14,ranger_revers:14,rankdir:6,raphson:10,rather:[7,9,14,16,18],ratio:9,reach:[6,7,8,14],read:[0,1,7,8,12,20,21],readabl:15,reader:[6,12],readi:20,readm:16,real:12,realiz:[4,5,12,16],rearrang:[2,12,20],reason:[7,9,17,20],rebuild:[18,21],rec1:[2,3,14],rec2:[2,3,14],recent:20,recogn:23,recombin:17,record:[9,24],recur:[3,14,20],recurs:[0,2,3,6,8,9,10,17,20,22,25],recus:9,redefin:22,redistribut:[3,9],redo:6,reduc:[2,20],redund:25,refactor:[0,9,11,22],refer:[0,2],referenti:17,reflect:17,regard:17,region:16,regist:2,regular:[20,22,23],reifi:19,reimplement:[17,22],relat:[6,20],releas:11,remain:[2,9,11,20],remaind:[3,10],rememb:6,remind:20,remov:[3,12,20,25,26],render:22,repeat:[4,7],repeatedli:7,repetit:6,repl:[0,1],replac:[0,2,3,8,13,14,17,18,20,21,22,25],repositori:0,repr:[6,20],repres:[2,9,12,17,23,24],represent:25,reprod:8,repurpos:20,requir:[16,17,20,25],res:20,research:20,resembl:9,resolut:17,resourc:[3,17],respect:[6,7,17],rest:[3,7,8,9,12,14,16,21,22,25,26],rest_two:12,restart:3,restor:2,result:[1,2,3,6,7,12,13,14,17,18,20,21],resum:9,retir:2,retri:9,reus:[12,20],revers:[3,4,7,8,14,20,21,22,25],revisit:20,rewrit:[3,9,16,20],rewritten:9,rid:12,right:[8,9,13,18,20,22,24,25],rightest:12,rightmost:7,rigor:17,risk:20,rkei:18,rob:20,roll:[3,10,12,18],roll_dn:20,rolldown:[3,19,20,26],rollup:[3,20,26],root:[3,10,13],rotate_seq:4,rough:16,round:[4,20],row:6,rrest:[3,19,20,26],rshift:26,rule:[17,22],run:[0,1,3,7,9,10,12,13,14,16,17,18,20,21],runtim:17,runtimeerror:25,sai:[6,8,12,13,16,18,20],same:[2,5,7,12,17,20,25],sandwich:[2,3,14],save:[2,6,7,9],scan:3,scanner:[9,23],scenario:21,scm:26,scope:[4,8,12],search:[0,12],sec:20,second:[3,4,9,12,14,16,18,25,26],section:14,see:[0,6,8,9,10,11,13,14,15,16,20,21,24],seem:[0,7,9,16,18,20,26],seen:[20,21],select:3,self:[6,17,20],semant:[2,3,9,11,12,17,20],semi:9,send:9,sens:[0,2,7,20,21],separ:[9,17,20,23],seq:20,sequenc:[0,1,2,3,4,7,9,12,14,15,21,22,23,26],sequence_to_stack:20,seri:[7,8,12,16,21],ses:20,set:[2,3,6,14,20,22],seven:[7,8],sever:[0,5,9,14],shape:[6,17],share:[3,9],shelf:2,shew:6,shift:[7,8],shorter:22,shorthand:12,should:[2,3,6,7,12,14,17,20],shouldn:9,show:[5,16,17,20,21],shunt:[3,21],side:[6,12,19,20,26],sign:3,signatur:26,signifi:[9,12],similar:[12,16,18,20],simon:9,simpl:[6,9,14,16,25,26],simplefunctionwrapp:[3,15,20],simpler:18,simplest:[20,22],simpli:5,simplifi:[7,12,21],sinc:[2,7,12,16,20],singl:[3,8,9,15,16,17,20,23,26],singleton:6,situ:12,situat:12,six:[7,8,9],sixti:[7,8],size:[4,6,9,22],skeptic:9,skip:20,slight:10,slightli:[12,14,20],small:4,smallest:3,smart:12,softwar:9,solei:2,solut:[7,8],solvabl:9,some:[0,2,3,6,8,9,12,14,16,17,18,20,22,25,26],somehow:[12,20],someth:[2,4,11,12,20],sometim:12,somewher:[12,22],sort:[3,6,12,17,20],sort_:3,sourc:[0,1,3,20,22,23,24,25],space:[7,24],span:7,spawn:20,special:[8,12,22],specif:[0,5],specifi:[12,17],speed:15,spell:[6,18],sphinx:[22,25],spiral:[0,22],spiral_next:16,spirit:[0,1,18],split:[6,20],split_at:4,sqr:[3,9,10,13,21],sqrt:[3,10,20,26],squar:[0,3,10,20,22,23],stack:[0,1,3,7,8,10,12,13,14,15,16,17,18,19,21,22,23,24,26],stack_effect:20,stack_effect_com:20,stack_to_str:[19,25],stacki:20,stackjoytyp:20,stackoverflow:16,stackstarjoytyp:20,stage:18,stai:[0,1],stand:[5,6],standard:[9,12],star:[18,20],stare:12,start:[6,7,8,9,10,12,14,18,20,26],state:[9,22],state_nam:6,statement:[3,6,16],stdout:[19,20],step:[3,4,7,9,12,15,20,21,22],step_zero:4,stepper:16,still:[6,12,20],stop:12,stopiter:6,storag:[7,12],store:[7,14,20],stori:14,str:[1,6,20,23,24,25],straightforward:[4,6,8,10,16,20,22],stream:[7,19,20],stretch:12,string:[1,2,3,4,9,20,21,22,23,24,25],stringi:6,structur:[9,17,18,20,21,22,25],stuck:6,studi:6,stuff:[12,20],stuncon:[3,26],stununcon:[3,26],style:[0,5,20],sub:[11,17,26],subclass:9,subject:[17,21],subsequ:17,subset:[20,26],substitut:[6,12,20],subtract:7,subtyp:22,succ:[3,20,26],succe:20,success:10,suck:20,suffic:20,suffici:12,suffix:20,suggest:[5,6,12],suitabl:[3,5,7],sum:[3,4,8,9,13,14,15,18],sum_:[3,20],summand:7,sumtre:18,suppli:[12,23],support:[9,20,24,25],sure:17,suspect:2,svg:6,swaack:[3,13,15,16,20,21,26],swap:[3,4,7,8,9,10,12,14,15,16,17,18,19,21,26],swon:[3,8,9,14,18,20,21,26],swoncat:[8,9,10,14,18],swuncon:14,sym:6,symbol:[1,2,3,6,17,20,21,22,23],symboljoytyp:20,symmetr:[7,12,16],symmetri:[6,16],syntact:9,syntax:[9,25],sys:[19,20,25],system:[9,12,17],tabl:[6,20],tag:[6,20,26],tail:[12,20,22,25],tailrec:3,take:[3,4,6,7,9,10,12,14,16,17,20,25],talk:[9,12,20,25],target:21,tast:5,tbd:9,tear:14,technic:2,techniqu:[5,21],technolog:2,temporari:21,ten:7,term:[1,2,6,9,10,14,17,20,22,23,25,26],termin:[2,3,6,14],ternari:9,test:[2,3,14],text:[0,1,3,20],text_to_express:[9,19,23],textual:9,than:[0,3,6,7,8,9,10,14,17,18,20,25,26],thei:[2,6,7,8,9,12,14,16,17,20,21,23,25],them:[0,2,3,6,7,8,12,14,16,17,20,21,22,26],themselv:[17,20],theori:[2,3,14,17],therefor:8,thi:[0,1,2,3,4,5,6,7,8,9,10,13,14,16,17,18,20,21,22,23,24,25,26],thing:[2,8,12,14,17,20,21,23,25,26],think:[2,7,9,12,14,17,18,20],third:[3,4,8,9,12,26],thirti:7,those:[2,3,6,12,14,16,20,22,26],though:[7,17],thought:[9,17],thousand:7,thread:[2,17],three:[2,3,6,7,9,12,13,16,18,20,22],through:[1,7,9,18,20,21,25,26],thu:4,thun:[2,3,5,11,14,17],thunder:9,thunk:17,time:[3,6,7,9,10,12,14,16,17,20,21],titl:20,to_check:6,to_set:12,todai:9,todo:[9,23],togeth:[8,9,17,20,22],token:23,toler:22,too:[6,14,20],tool:[9,20],tooo:20,top:[2,3,9,14,20,24,25],total:[4,7],total_match:4,tower:20,trace:[0,9,13,14,16,21,22,25],traceback:20,traceprint:24,track:[13,20,21],tracker:0,transform:5,transit:6,translat:[5,13,20,22],trap:6,travers:[0,22],treasur:0,treat:[0,2,3,14,20,22],treatment:8,tree:[0,9,22],treegrind:22,treestep:[0,22],tri:7,triangl:17,triangular_numb:14,trick:[7,20],tricki:20,trobe:0,trove:0,truediv:26,truthi:[3,9,17,20],tuck:[3,9,20,26],tupl:[3,6,9,20,25],turn:[2,3,6,20,22],twice:[12,14],two:[0,2,3,7,9,10,12,13,14,16,17,18,19,20,21,22,25,26],txt:3,type:[0,1,5,9,12,14,17,22,23,24,25],typeerror:20,typeless:20,typic:[2,3,13,14],ulam:[0,16],unari:9,unarybuiltinwrapp:3,unbalanc:[12,23],unbound:26,unchang:12,uncompil:20,uncon:[3,4,8,9,12,14,18,21,26],under:[2,3,9,12],underli:[6,17,20],underscor:20,understand:[0,12],undistinguish:12,undocu:9,unfinish:6,unfortun:25,unicod:20,unif:[20,22],unifi:19,union:6,uniqu:[3,6,12,20],unit:[3,4,9,14,17,26],univers:[0,9,17,20],unlik:17,unnecessari:22,unnecesssari:20,unpack:[2,3,12,25],unpair:7,unquot:[9,16,18,23],unread:[0,16],unrol:6,unstack:20,unswon:[3,26],untangl:14,until:[6,8,17],unus:7,unusu:12,unwrap:6,updat:[0,19,22,26],uppercas:6,upward:17,usag:9,use:[0,2,3,5,6,7,8,9,10,11,12,13,14,15,16,18,21,22,25],used:[0,3,5,9,12,14,16,17,20,21,23,25],useful:[0,17,20],user:18,uses:[2,3,6,7,14],using:[8,12,13,14,16,18,21,26],usual:[0,2,14],util:[0,3,15,19,20],valid:20,valu:[0,1,2,3,7,9,10,13,14,15,16,17,18,20,22,23,25,26],value_n:12,valueerror:[6,20,25],variabl:[20,22],variant:12,variat:[14,17,22],varieti:[5,9],variou:0,vener:25,verbos:5,veri:[0,1,5,6,9,12,16,25],versa:[2,20],version:[0,1,2,6,8,11,18,21,22],via:9,vice:[2,20],view:[12,22],viewer:[1,9,11,24],vii:22,visibl:20,von:[0,2,3,5,14],waaaai:6,wai:[0,2,3,4,5,6,7,9,14,15,16,17,20],wait:17,want:[2,3,7,8,10,12,14,20],warranti:[3,9],wash:9,wast:9,web:25,websit:[0,7],welcom:9,well:[0,4,5,9,10,12,20,23],went:20,were:[9,20,21],what:[2,3,5,6,9,12,14,17,18,20,24],whatev:[2,3,14,18,25],when:[7,8,9,12,14,17,20,21,23,25,26],where:[2,3,4,6,9,12,14,16,20,22,25],whether:[3,14],which:[0,1,3,6,7,9,10,12,14,16,17,18,20,21,23,25,26],whole:[2,3,7,14,18,20],whose:8,why:[10,17,18],wiki:12,wikipedia:[0,12,21],wildli:9,wind:9,wire:14,within:[9,12,15,22],without:[2,9,12,13,16,17,20],won:[12,20,25],word:[0,3,4,7,9,14,21],work:[0,3,4,6,7,8,9,10,12,13,14,16,17,18,21,22,25,26],worker:17,worri:17,worth:7,would:[2,7,8,9,10,12,14,17,20,21,25],wrap:[3,9],wrapper:20,write:[4,5,6,10,12,14,16,17,18,20,21,22,25],written:[0,1,10,12,15,20,25],wrong:2,wrote:20,xrang:20,yang:20,yeah:17,year:[9,20],yet:[12,17,20,21],yield:[2,3,14,20,25],yin:22,you:[0,2,3,6,7,8,9,11,12,13,14,15,16,17,18,20,21,24,25,26],your:[2,3,4,9,14,20],yourself:[6,9,12],zero:[3,6,12,14,17,18,20,23,25],zerodivisionerror:20,zip:[4,6,7,20],zip_:3,zipper:[0,22],zstr:21},titles:["Thun 0.4.1 Documentation","Joy Interpreter","Functions Grouped by, er, Function with Examples","Function Reference","Joy Example Code","Categorical Programming","\u2202RE","Developing a Program in Joy","Using <code class=\"docutils literal notranslate\"><span class=\"pre\">x</span></code> to Generate Values","Thun: Joy in Python","Newton\u2019s method","No Updates","Treating Trees I: Ordered Binary Trees","Quadratic formula","Recursion Combinators","Replacing Functions in the Dictionary","Square Spiral Example Joy Code","The Four Fundamental Operations of Definite Action","Treating Trees II: <code class=\"docutils literal notranslate\"><span class=\"pre\">treestep</span></code>","Type Checking","The Blissful Elegance of Typing Joy","Traversing Datastructures with Zippers","Essays about Programming in Joy","Parsing Text into Joy Expressions","Tracing Joy Execution","Stack or Quote or Sequence or List\u2026","Type Inference of Joy Expressions"],titleterms:{"\u03bb":6,"\u03d5":6,"boolean":16,"case":[10,12],"function":[2,3,6,9,10,12,14,15,17,18,20],"long":15,"new":12,"p\u00f6ial":20,"try":6,"void":2,"while":[2,17],Adding:12,Not:16,One:[8,12],The:[7,9,12,14,16,17,18,20],There:9,Using:8,With:[6,18],about:22,action:17,add:[2,12],adding:12,address:21,alphabet:6,altern:18,ana:14,analysi:7,anamorph:[2,14],app1:2,app2:2,app3:2,appendix:[12,14,20],appli:17,approxim:10,argument:20,auto:3,averag:2,base:[10,12],binari:[2,12,18],bliss:20,both:12,branch:[2,12,16,17],brzozowski:6,can:12,cata:14,catamorph:14,categor:5,challeng:4,chatter:2,check:19,child:12,choic:2,clear:2,cleav:[2,17],cmp:12,code:[0,4,9,12,16],combin:[2,12,14,20],comment:20,compact:6,compar:12,comparison:2,compil:[8,20],compile_:20,compos:20,comput:10,con:[2,20],concat:2,conclus:[14,16,20],consecut:10,continu:9,current:12,datastructur:[6,9,12,21],deal:20,decrement:16,defin:[12,18],definit:[13,17],delabel:20,delet:12,deriv:[6,13,14,18],design:14,determin:21,develop:7,diagram:6,dialect:0,dictionari:15,dip:[2,21],dipd:2,dipdd:2,direco:8,disenstacken:2,distinguish:20,div:2,doc_from_stack_effect:20,document:0,doe:12,down_to_zero:2,drive:6,drop:2,dup:[2,20],dupd:2,dupdip:2,effect:20,eleg:20,els:12,empti:12,enstacken:2,equal:12,essai:22,euler:[7,8],eval:9,even:8,exampl:[0,2,4,9,12,14,16,18,19],execut:24,explor:6,express:[6,9,23,26],extract:18,factori:14,fail:19,fibonacci:8,filter:7,find:[10,12,14],finish:17,finit:6,first:[2,7,16,17,20],five:8,flatten:2,flexibl:18,floordiv:2,form:16,formula:13,found:12,four:[14,17],fsm:6,ftw:4,fulmin:17,fun:14,fundament:17,further:7,gcd:2,gener:[3,6,7,8,10,16],genrec:2,get:[12,18],getitem:2,given:18,greater:12,group:2,handl:17,have:[12,18],help:2,highest:12,host:0,how:[7,8],hybrid:20,hylo:14,hylomorph:14,identifi:20,ift:[2,17],iii:20,implement:[6,20],increment:16,indic:0,infer:[20,26],inferenc:20,inform:0,infra:[2,21],integ:7,interest:8,interlud:12,intern:23,interpret:[1,9,20],item:21,iter:[7,12],joi:[0,1,3,4,7,9,14,16,20,21,22,23,24,25,26],join:17,just:7,kei:12,kind:17,languag:0,larger:6,least_fract:2,left:12,less:12,let:[6,7],letter:6,librari:[3,9,20],like:12,list:[2,25],literari:9,littl:7,logic:[2,20],loop:[2,9,17],lower:12,lshift:2,machin:6,make:[8,10],mani:7,map:[2,17],match:6,math:2,memoiz:6,method:10,min:2,miscellan:2,mod:2,modifi:20,modulu:2,more:12,most:12,mul:[2,20],multipl:[7,8,20],must:12,name:13,neg:[2,16],newton:10,next:[4,10],node:12,non:12,now:12,nullari:2,nulli:6,number:[14,20],one:9,onli:9,oper:17,order:[12,18],origin:16,osdn:0,other:17,our:12,out:6,over:2,pack:7,pam:[2,17],para:14,paradigm:20,parallel:17,parameter:[12,18],pars:[2,23],parser:[9,23],part:[4,20],pass:9,path:21,pattern:14,per:12,piec:16,pop:[2,20],popd:2,popop:2,pow:2,power:8,pred:2,predic:[7,10,12,16,18],pretty_print:24,primit:14,primrec:2,print:9,problem:[7,8],process:12,product:2,program:[5,7,13,18,22],progress:20,project:[0,7,8],pure:9,put:[12,13,16,18],python:[9,15,20],quadrat:13,quick:0,quot:[2,25],rang:[2,7,14],range_to_zero:2,read:9,recur:[10,12],recurs:[12,14,18],redefin:[12,18],refactor:[4,7,12],refer:3,regular:[6,9],reimplement:18,relabel:20,rem:2,remaind:2,remov:2,render:7,repl:9,replac:[12,15],repres:[6,20],represent:6,reset:8,rest:[2,20],revers:[2,6,19],right:[12,21],rightmost:12,roll:[2,20],rolldown:2,rollup:2,rshift:2,rule:[6,20],run:[2,8],second:[2,20],select:2,sequenc:[8,17,20,25],set:[10,12],shorter:15,should:9,shunt:2,simpl:20,simplest:7,size:[2,15],sourc:12,special:[14,20],spiral:16,sqr:[2,20],sqrt:[2,13],squar:16,stack:[2,9,20,25],start:0,state:6,step:[2,14,18],straightforward:13,stream:6,string:6,structur:12,style:9,sub:[2,12],subtyp:20,succ:2,sum:[2,7],swaack:2,swap:[2,20],swon:2,swoncat:2,symbol:[9,14],tabl:0,tail:14,take:2,term:[7,8,18],ternari:2,text:23,than:12,them:13,thi:12,third:[2,20],three:8,thun:[0,9],time:[2,8],togeth:[12,13,16,18],token:9,toler:10,trace:[15,24],traceprint:9,trampolin:6,translat:16,travers:[12,18,21],treat:[12,18],tree:[12,18,21],treegrind:18,treestep:18,triangular:14,truediv:2,truthi:2,tuck:2,turn:16,two:[6,8],type:[19,20,26],unari:2,unbound:20,uncon:[2,20],unif:19,unifi:20,unit:2,unnecessari:7,unquot:2,unstack:2,updat:[11,20],use:20,util:[24,25,26],valu:[8,12],variabl:13,variat:8,version:[7,12,15,20],view:9,vii:20,within:10,word:2,work:[19,20],write:13,xor:2,yin:20,zero:8,zip:2,zipper:21}})
\ No newline at end of file
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/notebooks/Advent_of_Code_2017_December_1st.rst
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/sphinx_docs/notebooks/Advent_of_Code_2017_December_1st.rst Wed Jun 03 07:52:21 2020 -0700
@@ -0,0 +1,281 @@
1+Joy Example Code
2+================
3+
4+A brief example of Joy programming from the `Advent of Code 2017,
5+December 1st puzzle <https://adventofcode.com/2017/day/1>`__.
6+
7+ Given a sequence of digits (your puzzle input) and find the sum of
8+ all digits that match the next digit in the list. The list is
9+ circular, so the digit after the last digit is the first digit in
10+ the list.
11+
12+For example:
13+
14+- 1122 produces a sum of 3 (1 + 2) because the first digit (1) matches
15+ the second digit and the third digit (2) matches the fourth digit.
16+- 1111 produces 4 because each digit (all 1) matches the next.
17+- 1234 produces 0 because no digit matches the next.
18+- 91212129 produces 9 because the only digit that matches the next one
19+ is the last digit, 9.
20+
21+.. code:: ipython3
22+
23+ from notebook_preamble import J, V, define
24+
25+I'll assume the input is a Joy sequence of integers (as opposed to a
26+string or something else.)
27+
28+We might proceed by creating a word that makes a copy of the sequence
29+with the first item moved to the last, and zips it with the original to
30+make a list of pairs, and a another word that adds (one of) each pair to
31+a total if the pair matches.
32+
33+::
34+
35+ AoC2017.1 == pair_up total_matches
36+
37+Let's derive ``pair_up``:
38+
39+::
40+
41+ [a b c] pair_up
42+ -------------------------
43+ [[a b] [b c] [c a]]
44+
45+Straightforward (although the order of each pair is reversed, due to the
46+way ``zip`` works, but it doesn't matter for this program):
47+
48+::
49+
50+ [a b c] dup
51+ [a b c] [a b c] uncons swap
52+ [a b c] [b c] a unit concat
53+ [a b c] [b c a] zip
54+ [[b a] [c b] [a c]]
55+
56+.. code:: ipython3
57+
58+ define('pair_up dup uncons swap unit concat zip')
59+
60+.. code:: ipython3
61+
62+ J('[1 2 3] pair_up')
63+
64+
65+.. parsed-literal::
66+
67+ [[2 1] [3 2] [1 3]]
68+
69+
70+.. code:: ipython3
71+
72+ J('[1 2 2 3] pair_up')
73+
74+
75+.. parsed-literal::
76+
77+ [[2 1] [2 2] [3 2] [1 3]]
78+
79+
80+Now we need to derive ``total_matches``. It will be a ``step`` function:
81+
82+::
83+
84+ total_matches == 0 swap [F] step
85+
86+Where ``F`` will have the pair to work with, and it will basically be a
87+``branch`` or ``ifte``.
88+
89+::
90+
91+ total [n m] F
92+
93+It will probably be easier to write if we dequote the pair:
94+
95+::
96+
97+ total [n m] i F′
98+ ----------------------
99+ total n m F′
100+
101+Now ``F′`` becomes just:
102+
103+::
104+
105+ total n m [=] [pop +] [popop] ifte
106+
107+So:
108+
109+::
110+
111+ F == i [=] [pop +] [popop] ifte
112+
113+And thus:
114+
115+::
116+
117+ total_matches == 0 swap [i [=] [pop +] [popop] ifte] step
118+
119+.. code:: ipython3
120+
121+ define('total_matches 0 swap [i [=] [pop +] [popop] ifte] step')
122+
123+.. code:: ipython3
124+
125+ J('[1 2 3] pair_up total_matches')
126+
127+
128+.. parsed-literal::
129+
130+ 0
131+
132+
133+.. code:: ipython3
134+
135+ J('[1 2 2 3] pair_up total_matches')
136+
137+
138+.. parsed-literal::
139+
140+ 2
141+
142+
143+Now we can define our main program and evaluate it on the examples.
144+
145+.. code:: ipython3
146+
147+ define('AoC2017.1 pair_up total_matches')
148+
149+.. code:: ipython3
150+
151+ J('[1 1 2 2] AoC2017.1')
152+
153+
154+.. parsed-literal::
155+
156+ 3
157+
158+
159+.. code:: ipython3
160+
161+ J('[1 1 1 1] AoC2017.1')
162+
163+
164+.. parsed-literal::
165+
166+ 4
167+
168+
169+.. code:: ipython3
170+
171+ J('[1 2 3 4] AoC2017.1')
172+
173+
174+.. parsed-literal::
175+
176+ 0
177+
178+
179+.. code:: ipython3
180+
181+ J('[9 1 2 1 2 1 2 9] AoC2017.1')
182+
183+
184+.. parsed-literal::
185+
186+ 9
187+
188+
189+::
190+
191+ pair_up == dup uncons swap unit concat zip
192+ total_matches == 0 swap [i [=] [pop +] [popop] ifte] step
193+
194+ AoC2017.1 == pair_up total_matches
195+
196+Next Part of the Challenge
197+--------------------------
198+
199+Now the paired digit is "halfway" round.
200+
201+::
202+
203+ [a b c d] dup size 2 / [drop] [take reverse] cleave concat zip
204+
205+.. code:: ipython3
206+
207+ J('[1 2 3 4] dup size 2 / [drop] [take reverse] cleave concat zip')
208+
209+
210+.. parsed-literal::
211+
212+ [[3 1] [4 2] [1 3] [2 4]]
213+
214+
215+I realized that each pair is repeated...
216+
217+.. code:: ipython3
218+
219+ J('[1 2 3 4] dup size 2 / [drop] [take reverse] cleave zip')
220+
221+
222+.. parsed-literal::
223+
224+ [1 2 3 4] [[1 3] [2 4]]
225+
226+
227+.. code:: ipython3
228+
229+ define('AoC2017.1.extra dup size 2 / [drop] [take reverse] cleave zip swap pop total_matches 2 *')
230+
231+.. code:: ipython3
232+
233+ J('[1 2 1 2] AoC2017.1.extra')
234+
235+
236+.. parsed-literal::
237+
238+ 6
239+
240+
241+.. code:: ipython3
242+
243+ J('[1 2 2 1] AoC2017.1.extra')
244+
245+
246+.. parsed-literal::
247+
248+ 0
249+
250+
251+.. code:: ipython3
252+
253+ J('[1 2 3 4 2 5] AoC2017.1.extra')
254+
255+
256+.. parsed-literal::
257+
258+ 4
259+
260+
261+Refactor FTW
262+============
263+
264+With Joy a great deal of the heuristics from Forth programming carry
265+over nicely. For example, refactoring into small, well-scoped commands
266+with mnemonic names...
267+
268+::
269+
270+ rotate_seq == uncons swap unit concat
271+ pair_up == dup rotate_seq zip
272+ add_if_match == [=] [pop +] [popop] ifte
273+ total_matches == [i add_if_match] step_zero
274+
275+ AoC2017.1 == pair_up total_matches
276+
277+ half_of_size == dup size 2 /
278+ split_at == [drop] [take reverse] cleave
279+ pair_up.extra == half_of_size split_at zip swap pop
280+
281+ AoC2017.1.extra == pair_up.extra total_matches 2 *
diff -r 33cf8e5aec62 -r ab34fee54595 docs/sphinx_docs/notebooks/index.rst
--- a/docs/sphinx_docs/notebooks/index.rst Sat May 30 23:39:16 2020 -0700
+++ b/docs/sphinx_docs/notebooks/index.rst Wed Jun 03 07:52:21 2020 -0700
@@ -11,6 +11,7 @@
1111 Developing
1212 Quadratic
1313 Replacing
14+ Advent_of_Code_2017_December_1st
1415 Recursion_Combinators
1516 Ordered_Binary_Trees
1617 Treestep
Afficher sur ancien navigateur de dépôt.