OSDN Git Service

Working on docs.
authorSimon Forman <sforman@hushmail.com>
Thu, 26 Apr 2018 18:47:55 +0000 (11:47 -0700)
committerSimon Forman <sforman@hushmail.com>
Thu, 26 Apr 2018 18:47:55 +0000 (11:47 -0700)
12 files changed:
docs/sphinx_docs/_build/html/_modules/index.html
docs/sphinx_docs/_build/html/_sources/index.rst.txt
docs/sphinx_docs/_build/html/index.html
docs/sphinx_docs/_build/html/lib.html
docs/sphinx_docs/_build/html/objects.inv
docs/sphinx_docs/_build/html/searchindex.js
docs/sphinx_docs/index.rst
docs/sphinx_docs/notebooks/Developing.rst [moved from docs/sphinx_docs/notebooks/3. Developing a Program.rst with 97% similarity]
docs/sphinx_docs/notebooks/Newton-Raphson.rst
docs/sphinx_docs/notebooks/Quadratic.rst
docs/sphinx_docs/notebooks/Trees.rst
docs/sphinx_docs/notebooks/index.rst

index 1f1b9e2..d70b1d9 100644 (file)
@@ -34,7 +34,6 @@
 <ul><li><a href="joy/joy.html">joy.joy</a></li>
 <li><a href="joy/library.html">joy.library</a></li>
 <li><a href="joy/parser.html">joy.parser</a></li>
-<li><a href="joy/pribrary.html">joy.pribrary</a></li>
 <li><a href="joy/utils/pretty_print.html">joy.utils.pretty_print</a></li>
 <li><a href="joy/utils/stack.html">joy.utils.stack</a></li>
 </ul>
index c940180..aa267ab 100644 (file)
@@ -87,6 +87,7 @@ There are also some Jupyter notebooks.
    pretty
    library
    lib
+   notebooks/index
 
 
 
index b7a53d8..fc24b9c 100644 (file)
@@ -114,6 +114,13 @@ There are also some Jupyter notebooks.</p>
 <li class="toctree-l2"><a class="reference internal" href="lib.html#void"><code class="docutils literal notranslate"><span class="pre">void</span></code></a></li>
 </ul>
 </li>
+<li class="toctree-l1"><a class="reference internal" href="notebooks/index.html">Essays about Programming in Joy</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="notebooks/Developing.html">Developing a Program in Joy</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebooks/Trees.html">Treating Trees</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebooks/Newton-Raphson.html">Newton’s method</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebooks/Quadratic.html">Quadratic formula</a></li>
+</ul>
+</li>
 </ul>
 </div>
 </div>
index ffee1c2..c30834b 100644 (file)
@@ -16,6 +16,7 @@
     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Essays about Programming in Joy" href="notebooks/index.html" />
     <link rel="prev" title="Function Reference" href="library.html" />
    
   <link rel="stylesheet" href="_static/custom.css" type="text/css" />
@@ -1353,6 +1354,7 @@ soley of containers, without strings or numbers or anything else.)</p>
 <ul>
   <li><a href="index.html">Documentation overview</a><ul>
       <li>Previous: <a href="library.html" title="previous chapter">Function Reference</a></li>
+      <li>Next: <a href="notebooks/index.html" title="next chapter">Essays about Programming in Joy</a></li>
   </ul></li>
 </ul>
 </div>
index df75c8f..be9e696 100644 (file)
Binary files a/docs/sphinx_docs/_build/html/objects.inv and b/docs/sphinx_docs/_build/html/objects.inv differ
index 5fbd5df..aaa28d1 100644 (file)
@@ -1 +1 @@
-Search.setIndex({docnames:["index","joy","lib","library","notebooks/0. This Implementation of Joy in Python","notebooks/1. Basic Use of Joy in a Notebook","notebooks/2. Library Examples","notebooks/3. Developing a Program","notebooks/4. Replacing Functions in the Dictionary","notebooks/Advent of Code 2017 December 1st","notebooks/Advent of Code 2017 December 2nd","notebooks/Advent of Code 2017 December 3rd","notebooks/Advent of Code 2017 December 4th","notebooks/Advent of Code 2017 December 5th","notebooks/Advent of Code 2017 December 6th","notebooks/Generator Programs","notebooks/Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators","notebooks/Newton-Raphson","notebooks/Quadratic","notebooks/Trees","notebooks/Zipper","notebooks/index","parser","pretty","stack"],envversion:52,filenames:["index.rst","joy.rst","lib.rst","library.rst","notebooks/0. This Implementation of Joy in Python.rst","notebooks/1. Basic Use of Joy in a Notebook.rst","notebooks/2. Library Examples.rst","notebooks/3. Developing a Program.rst","notebooks/4. Replacing Functions in the Dictionary.rst","notebooks/Advent of Code 2017 December 1st.rst","notebooks/Advent of Code 2017 December 2nd.rst","notebooks/Advent of Code 2017 December 3rd.rst","notebooks/Advent of Code 2017 December 4th.rst","notebooks/Advent of Code 2017 December 5th.rst","notebooks/Advent of Code 2017 December 6th.rst","notebooks/Generator Programs.rst","notebooks/Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators.rst","notebooks/Newton-Raphson.rst","notebooks/Quadratic.rst","notebooks/Trees.rst","notebooks/Zipper.rst","notebooks/index.rst","parser.rst","pretty.rst","stack.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,""],concat:[3,1,1,""],cons:[3,1,1,""],dip:[3,1,1,""],dipd:[3,1,1,""],dipdd:[3,1,1,""],divmod_:[3,1,1,""],drop:[3,1,1,""],dup:[3,1,1,""],dupd:[3,1,1,""],dupdip:[3,1,1,""],first:[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,""],ifte:[3,1,1,""],infra:[3,1,1,""],initialize:[3,1,1,""],inscribe:[3,1,1,""],loop:[3,1,1,""],map_:[3,1,1,""],max_:[3,1,1,""],min_:[3,1,1,""],over:[3,1,1,""],parse:[3,1,1,""],pm:[3,1,1,""],pop:[3,1,1,""],popd:[3,1,1,""],popdd:[3,1,1,""],popop:[3,1,1,""],pred:[3,1,1,""],remove:[3,1,1,""],rest:[3,1,1,""],reverse:[3,1,1,""],rolldown:[3,1,1,""],rollup:[3,1,1,""],select:[3,1,1,""],sharing:[3,1,1,""],shunt:[3,1,1,""],sort_:[3,1,1,""],sqrt:[3,1,1,""],stack_:[3,1,1,""],step:[3,1,1,""],succ:[3,1,1,""],sum_:[3,1,1,""],swaack:[3,1,1,""],swap:[3,1,1,""],take:[3,1,1,""],times:[3,1,1,""],tuck:[3,1,1,""],uncons:[3,1,1,""],unique:[3,1,1,""],unstack:[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":{pretty_print:[23,0,0,"-"],stack:[24,0,0,"-"]},"joy.utils.pretty_print":{TracePrinter:[23,2,1,""]},"joy.utils.pretty_print.TracePrinter":{viewer:[23,5,1,""]},"joy.utils.stack":{expression_to_string:[24,1,1,""],iter_stack:[24,1,1,""],list_to_stack:[24,1,1,""],pick:[24,1,1,""],pushback:[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","classmethod","Python class method"],"4":["py","exception","Python exception"],"5":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:classmethod","4":"py:exception","5":"py:method"},terms:{"0b11100111011011":7,"0th":4,"10m":16,"10n":16,"1st":21,"2nd":21,"3rd":21,"4ac":18,"4th":21,"5bkei":19,"5th":21,"6th":21,"\u03b5":17,"abstract":[4,19],"boolean":[2,3,4,6,19],"break":[4,14],"byte":7,"case":[2,3,4,6,8,10,14,16,17,24],"class":[3,4,22,23],"default":[3,13,15],"export":[3,4,22],"final":[2,6,11,16],"float":[3,4,20,22],"function":[0,1,5,6,7,8,9,10,11,12,13,15,17,20,21,22,23,24],"g\u00e9rard":20,"import":[2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"int":[4,11,15,16,20,22],"long":21,"new":[2,3,4,6,8,11,15,16,19],"return":[1,3,4,7,8,10,11,13,14,16,18,19,22,24],"short":18,"static":[2,6],"switch":[2,6],"true":[2,3,5,6,7,10,11,16,19],"try":[4,11,15,16],"void":[0,3,4,21],"while":[3,4,11,13,14,21,22],Adding:[4,21],And:[4,7,9,11,15,16,17,19,20],But:[0,4,7,10,16,19],For:[2,3,4,6,9,10,11,12,13,15,16,19,24],Going:10,Has:3,Its:3,Not:11,One:[2,4,6,21],RHS:19,TOS:[2,3,6,16],That:[4,7,16,19],The:[0,1,2,3,5,6,8,9,10,11,12,13,15,17,18,19,20,21,22,24],Then:[2,3,6,10,13,18,19],There:[0,4,11,13,16,19],Use:[3,16],Using:[11,16,19,21],With:[9,16,21],_pars:4,_print:[],aaa:12,abbrevi:19,about:[0,4,11,13,19,20,24],abov:[0,7,8,11,17,18,19,21],abs:[11,17],absolut:[4,11],accept:[1,2,3,4,6,7,16,19,20],access:[11,13],accomplish:18,accordingli:19,accumul:7,across:[11,13],action:[4,20],actual:[2,4,6,7,11,19],add:[3,4,7,9,10,11,15,18,19,21,23],add_alias:3,add_def:3,add_definit:[3,13,16,19],add_if_match:9,add_valu:13,added:19,adding:[7,11,19],addit:[0,2,3,4,6,7,13,16,19],address:21,admit:11,advantag:16,advent:21,after:[4,7,9,11,13,15],afterward:4,again:[2,3,4,6,7,11,13,19],against:[10,11],aggreg:[3,4,20],aka:[20,21],albrecht:0,algebra:19,algorithm:4,alia:3,alias:[3,4],align:[4,5],all:[3,4,7,9,10,15,16,17,19],alloc:11,allow:[16,19],almost:19,alon:17,along:[4,16],alphabet:3,alreadi:[8,11,20],also:[0,4,7,16],altern:19,although:[9,19],altogeth:15,alwai:[7,11,16],amort:19,amount:11,ana:21,analysi:21,anamorph:[4,21],ani:[4,7,13,19,20,22],annual:4,anonym:19,anoth:[9,16,19],answer:11,anyth:[2,3,4,6],aoc20017:10,aoc20173:11,aoc2017:[9,10,11,12,13,14],app1:[3,4,21],app2:[3,4,8,10,18,21],app3:[3,4,21],app:4,appear:[2,6,7,12,19],append:[4,13],appli:[2,3,6,7,10,17,19],applic:15,approach:7,approxim:17,archiv:0,aren:20,arg:[2,3,6],argument:[2,3,4,6,15,16,24],arithmet:[2,6],ariti:[2,6],around:[4,7,24],arrai:13,arrang:13,arriv:[15,19],art:5,articl:0,ask:[11,15],aspect:[0,11],assembl:13,assert:[11,14],assign:[4,24],associ:19,assum:[9,10,12,13],asterisk:19,attack:4,attempt:[0,1],attribut:3,automat:16,automodul:[],avail:[0,12],averag:[4,8,21],avoid:19,awar:[2,6],awkward:19,back:[11,13,19],backward:[4,19],bad:4,bag:4,banana:[16,19],bank:14,barb:16,base:[2,3,6,10,14,16,17],basic:[1,2,3,4,6,9,11,19],bear:13,beat:13,beauti:5,becaus:[2,3,4,6,9,10,11,13,16,19,20],becom:[4,9,18,19,24],been:[16,19,20],befor:[4,10,13,15,16,19],begin:[11,16,19],behavior:[17,19],behaviour:[0,1],behind:13,being:0,belong:13,below:[2,3,6,7,11,15,17,19,20],bespok:4,best:0,better:[7,11,15,19],between:[0,7,10,11],biannual:4,big:[11,13,19],binari:[0,4,15,19,21],binary_search_tre:19,binarybuiltinwrapp:3,bind:4,bingo:20,bit:[7,11,15,19],block:[7,14],bodi:[2,4,6,19],body_text:3,bool:[10,16],both:[2,4,6,7,8,11,13,16,17],bottom:15,boundari:11,bracket:[4,11,22],branch:[3,4,7,9,10,13,15,17,19,21],breakdown:21,breakpoint:4,bring:[4,7],btree:21,buck:19,bug:[0,4],build:[4,16,19,20],built:16,bundl:[2,3,6],burgeon:4,calcul:11,call:[2,4,6,16],caller:19,came:[13,19],can:[0,2,3,4,6,7,8,9,10,11,15,16,17,18,19,20,24],candid:10,captur:4,card:4,care:[4,7,11,24],carefulli:[19,20],carri:[9,11,16],cata:21,catamorph:[8,21],ccon:19,ceil:11,certain:[4,24],certainli:19,chang:[2,6,11,13,19,20],charact:20,chat:4,chatter:[0,21],cheat:14,check:[10,15,16,21],checksum:10,child0:19,child:19,childn:19,children:19,choic:[3,4,16,21],choos:19,circular:[9,19],cite_not:19,classmethod:3,clear:[3,4,7,11,21],cleav:[4,8,9,10,12,18,21],close:[0,1,4],clunki:7,cmp:21,cmp_:19,code:[0,1,4,5,16,17,19,21],codicil:21,collaps:16,collect:[4,15],column:11,combin:[0,3,4,7,12,15,20,21],come:[4,11,13],command:[4,9,19],common:[2,6,7,16],compar:[11,19],comparison:[0,21],compil:[2,4,6,13,16,21],complex:[3,20],compos:16,compound:19,comput:[2,4,6,7,10,11,13,17],con:[3,4,7,10,13,14,15,16,18,20,21,24],concat:[3,4,9,15,16,19,21],concatin:[3,24],concis:11,concret:16,concurr:[2,6],condit:[4,13],condition:10,confid:11,conflict:19,cons2:19,consecut:15,consid:[7,13,15,16,19,20],consist:[2,4,6,11,19],constant:19,constitu:16,consum:[10,16],contain:[0,2,3,4,6,11,12,15,16],content:[],context:[2,6],continu:[0,5,10,16,20],control:4,convert:[4,8,16,19,22,24],cook:16,cool:19,copi:[2,3,6,7,9,16,19],copyright:4,corner:11,correct:11,correctli:19,could:[2,4,6,7,11,13,16,19,20],count:[3,11,12,15],count_stat:14,counter:7,cours:[7,11,13,16,19],cover:11,cpu:11,crack:19,crap:21,crash:19,creat:[0,2,3,6,7,9,15,16,19],crude:[19,22],csp:4,current:[2,3,4,5,6,13,16,20],cycl:[7,15],cython:4,dai:[4,16],data:[2,3,4,6,11],datastructur:[2,4,6,16,19,20,22,24],datatyp:[4,24],ddididi:20,deal:[0,9,19],debugg:16,decemb:21,decid:19,decor:3,decoupl:16,decreas:11,decrement:3,deduc:7,deeper:0,def:[3,4,5,8,11,13,14,16,18,19,24],defi:3,defin:[2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,19,20,21],definit:[2,3,4,6,7,8,12,13,15,16,19,21],definitionwrapp:[3,13,16,19],deleg:4,delet:21,demonstr:16,depend:[16,19],deposit:19,dequot:[9,16],deriv:[2,3,4,6,7,9,10,21],descend:10,describ:[3,4,16,19,22],descript:[4,7,19],design:[2,3,6,10,19],desir:[4,11,19],destruct:19,detail:[4,11,19],detect:[10,15,16,19],determin:[10,11,21],develop:[4,15],diagram:7,dialect:1,dict:[1,3],dictionari:[1,3,4,5,8,18,19],did:11,didn:16,differ:[0,7,10,12,16,19],dig:20,digit:[7,9],dimension:11,dinfrirst:4,dip:[3,4,7,8,10,11,13,14,15,16,17,18,19,21],dipd:[3,4,13,15,16,18,19,20,21],dipdd:[3,4,19,21],direco:[14,21],direct:4,directli:[4,7,11,19,24],disappear:[2,6],discard:[3,15,16,17,19],discov:10,disenstacken:[4,19,21],disk:4,displac:[2,6],distanc:11,distribut:14,ditch:19,div:[3,4,21],dive:19,divid:10,divis:[10,19],divisor:10,divmod:[3,10],divmod_:3,doc:[2,3,4,6],document:[21,22],doe:[0,1,4,10,11,13,16,21,23],doesn:[4,7,9,13,16,19,24],dog:19,doing:[4,7,11,16,20],domain:11,don:[7,10,11,13,19],done:[2,4,6,7,15],doodl:11,door:4,doubl:7,down:[2,3,6,11,13,20],down_to_zero:[4,21],downward:13,dozen:4,draft:14,dream:4,drive:15,driven:7,driver:15,drop:[3,9,19,21],dudipd:4,due:9,dummi:10,dup:[3,4,5,7,9,10,11,13,14,15,16,17,18,19,20,21,24],dupd:[3,4,21],dupdip:[3,4,7,10,11,16,18,19,21],duplic:[3,12,16,19],durat:[2,6],dure:[2,6,8,16],each:[2,3,4,5,6,7,8,9,10,11,13,16,19],easi:[0,11,17,19,20],easier:[3,9,19],effect:[2,3,4,6,20],effici:[11,13,20],either:[1,2,3,6,10,16,19],eleg:[4,13,18,19],element:[2,3,6],elif:4,els:[2,3,4,6,9,10,13,14,16,19],embed:[19,20],empti:[3,4,10,19,24],enabl:4,encapsul:4,enclos:4,encod:[13,15],encount:13,end:[4,7,11,13,16,24],endless:15,enforc:[2,4,6],engend:4,enlarg:11,enough:[4,11,16,18],enstacken:[4,15,21],ensur:12,enter:4,entri:[3,20],epsilon:17,equal:[7,19],equat:[4,11,17],ergo:[11,16,19],err:[17,19],error:[4,11,17,22],escap:13,estim:17,etc:[3,11,20,21,22],euler:21,evalu:[1,2,3,4,5,6,8,9,16,19],even:[13,21],evenli:10,eventu:11,everi:15,everyth:[3,19],exactli:16,exampl:[0,3,4,7,9,10,11,12,13,15,16,19,21,22,24],exce:15,except:[4,19,22],execut:[0,1,2,3,4,6,8,10,17,20],exit:13,expect:[2,3,4,6,10,16,17,19,24],experi:4,experiment:11,explan:4,explor:4,express:[0,1,2,3,4,5,6,8,16,19,20,23,24],expression_to_str:[4,24],extend:11,extra:[4,7,9,10],extract:[19,21],extrem:4,extrememli:4,facet:0,facil:[4,5],fact:[19,22],factor:[2,4,6,7,21],factori:21,fail:[2,3,6,10,19,22],fals:[2,3,5,6,7,10,14,16],far:[13,16,19],fascin:0,fast:11,faster:11,fear:19,feel:11,few:[4,7,11],fewer:[3,4],fib:15,fib_gen:15,fibonacci:21,figur:[2,3,6,11,19],filter:[7,19],fin:7,find:[2,3,5,6,7,9,10,15,19,21,24],fine:[0,7,19],first:[3,4,5,8,9,10,11,13,14,15,16,18,19,20,21],fit:[4,7,18],five:[4,7,16,21],fix:[2,3,6],flag:10,flatten:[4,19,21],flexibl:19,floor:[3,11],floordiv:[4,7,21],flow:4,follow:[0,2,3,4,6,10,13,16,20],foo:19,form:[2,3,4,6,7,10,12,15,21,24],forman:4,format:23,formula:[7,11,21],forth:[4,9,13,19],fortun:13,forum:0,forward:[10,13],found:[4,13,14,19],four:[2,3,4,6,7,11,13,15,19,21],fourteen:7,fourth:[2,3,6,9,19],fractal:4,fraction0:4,fraction:[2,4,6],fragment:17,frame:4,framework:4,free:[4,19],freeli:[2,6,11],from:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,24],front:[2,3,6],ftw:21,full:[7,12],fun:11,functionwrapp:[3,19],funtion:19,further:21,fusion:21,futur:18,garbag:4,gari:19,gcd:[4,5,21],gen:14,gener:[2,3,4,6,11,13,17,21],genrec:[3,4,10,13,16,19,21],geometr:7,geometri:19,get:[2,4,6,7,8,10,11,15,16,17,21],get_valu:13,getdoc:4,getitem:[3,4,21],getsourc:4,give:[4,7,11,16,24],given:[2,3,6,7,8,9,10,11,13,14,15,19,20,21],glob:[],glue:4,goal:13,going:[10,11,13,19,20],good:[7,13,19],grab:3,grammar:22,grand:4,graph:11,great:[0,4,9,11],greater:[11,19],grid:11,group:[0,11],guard:[10,11],gui:[],had:[7,20],haiku:4,half:[7,20],half_of_s:9,halfwai:9,hand:[4,8,19],handl:[],happen:[4,11,19],hard:[17,20],hardli:16,has:[0,2,4,5,6,10,11,13,15,16,19,20,24],have:[2,3,4,6,7,9,10,11,13,14,15,16,19,20],head:[4,10,16,24],heh:[],hei:[],help:[4,8,12,16,19,21],help_:3,helper:[3,5,10],herd:4,here:[5,11,15,16,17,19,20,21],heterogen:19,heurist:[9,13],hide:19,higher:[4,19],highest:10,highli:[4,19],hindsight:10,hmm:19,hog:19,hoist:3,hold:7,hood:13,hope:[0,4,7],how:[0,7,11,12,13,16,19,20,21],html:[2,3,6,15,18],http:[4,19],huet:20,hugh:[17,19],human:4,hylo:21,hylomorph:21,hypothet:[2,6],id_:3,idea:[4,7,19],ident:[3,16],identifi:11,ift:[3,4,9,10,13,16,17,19,21],ignor:[3,19],illustr:16,imagin:20,immedi:[13,16],immut:[4,19],imper:16,implement:[0,1,2,3,4,6,11,14,16,18,19],impli:10,implicit:4,includ:12,inclus:7,incom:[4,24],incr_at:13,incr_step_count:13,incr_valu:13,increas:[7,11,13],increment:[3,7],index:[0,4,11,14],index_of:14,indexerror:4,indic:19,infil:19,infinit:11,inform:3,infra:[3,4,8,15,16,18,19,21],infrastructur:3,init:13,init_print:11,initi:[2,3,4,5,6,8,10,11,12,13,17,19],inlin:19,inner:10,input:[1,9,10,11,12,16],inscrib:3,inspect:4,instal:0,instead:[7,11,15,16,19,20],instruct:13,integ:[2,3,4,6,7,9,10,11,12,13,15,16],integr:3,intend:[0,4],interact:4,interest:[0,7,11,15,19],interlock:11,intermedi:16,intern:0,interpret:[0,5,16,21,22],interrupt:4,interv:7,invari:3,invers:3,ipf:4,ipynb:15,isinst:4,isn:[16,19,20],item:[2,3,4,6,9,10,14,16,19,21,24],iter:[1,3,4,11,16,21,24],iter_stack:[4,8,14,24],its:[0,2,3,4,6,7,10,11,16,19,24],itself:[0,2,4,6,13,19],j05cmp:[2,3,6],jenni:19,job:13,john:[17,19],joi:[2,5,6,7,8,9,10,12,13,14,18,19,21],join:4,joy_:[],joypi:[13,14,16,19,20,21],jump:13,jupyt:0,just:[0,2,3,4,6,7,9,10,11,13,15,16,20],keep:20,kei:21,kevin:0,key_n:19,keyerror:19,kind:[2,4,5,6,11,13,16,19],kleen:19,know:[7,11,16,19],lambda:16,lambdifi:11,languag:[4,19],larg:11,larger:11,largest:[3,10,13],last:[7,9,13,16],lastli:[15,16],later:[4,13,17],law:[2,6,21],lcm:7,lead:[4,13],leaf:19,lean:4,learn:[0,14],least:[2,4,6,7,11,13,16,24],least_fract:[4,21],leav:[7,10,11,13,15,17,19],left:[4,5,11,15,16,20,24],leftov:16,legendari:13,legibl:13,len:14,length:[3,7],lens:16,less:[4,7,15,16,19],lesser:11,let:[4,7,9,10,11,13,15,16,17,18,19,20],level:19,lib:[],librari:[0,5,8,11,13,14,18,19,21],lieu:19,like:[2,3,4,5,6,7,10,11,14,16,18,19,22],line:[3,4,5,10,13,16,19],linear:24,link:0,linux:0,list:[0,3,7,9,10,12,13,14,20,21],list_to_stack:[4,13,14,24],liter:[1,19,20,22],littl:[11,13,19,21],lkei:19,load:[4,7],locat:[2,6,11],log_2:19,logic:[0,7,21],longer:[5,19],look:[4,11,15,19],lookup:[4,19],loop:[1,3,5,7,21],lot:[4,18,19,20],love:7,lower:7,lowest:10,lshift:[4,21],machin:[0,19],machineri:19,macro:4,made:[0,4,10,19,20],mai:[2,4,6,13,16,19],mail:0,main:[0,3,4,9,20],maintain:20,make:[2,3,4,6,7,8,9,16,20],make_distributor:14,manfr:[0,2,3,6],manhattan:11,mani:[0,4,11,12,13,15,16],manipul:11,manual:[11,16],map:[1,3,4,7,16,19,21],map_:3,mark:[11,13],marker:4,mask:[7,15],match:[0,1,9],materi:0,math:[0,4,11,13,19,21],mathemat:[4,11],matter:[7,9,16,17,19],max:[10,11,14],max_:3,maxdepth:[],maximum:[3,19],maxmin:10,mayb:[16,19],maze:13,mean:[4,7,10,16,19,24],meant:[4,16,19],meantim:13,mem:13,member:[2,3,6,11],memori:11,mental:4,mention:[2,6],mercuri:0,merg:19,meta:[4,19],methink:19,method:[3,4,11,21,23],mfloor:11,midpoint:7,might:[9,15,16,19],million:15,min:[4,10,21],min_:3,mind:13,minimum:3,minu:[3,18],mirror:0,miscellan:[0,21],mistak:14,mix:4,mnemon:9,mod:[3,4,21],model:4,modern:0,modif:[15,21],modifi:[4,13,20],modul:[0,1,3,4,22],modulu:[4,5,21],monkei:11,month:4,more:[0,3,4,7,8,12,13,15,16,18,19,22,24],most:[4,19],mostli:0,move:[9,11,13],movement:[2,6],mrank_of:11,much:[4,7,11,13,16,19],muck:19,mul:[4,18,20,21,23],multi:3,multipl:[16,21],must:[2,3,6,7,10,11,12,16,19],mutabl:13,n_kei:19,n_rang:15,n_valu:19,nail:13,name:[1,3,4,8,9,20,21,22,24],nativ:21,natur:[7,15,19],navig:20,need:[2,3,5,6,7,9,10,11,13,14,15,16,17,19],neg:[3,4,13,18,21],nest:[4,19,20],net:[],network:4,newton:21,next:[7,8,9,10,11,13,16,17,19],nice:[0,4,9,11,16,24],niether:[2,6],node:21,non:[10,19],none:[1,3,4],normal:[12,16],notat:[4,19],note:[2,4,6,7,11,19,24],notebook:[0,4,7,20],notebook_preambl:[2,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],noth:[2,4,19],notic:7,now:[4,7,8,9,10,11,15,16,17,19],nth:[3,24],nullari:[4,10,13,14,17,19,21],number:[1,2,3,6,7,8,10,15,17,21,24],object:22,observ:7,obviou:[15,17],obvious:[10,12,13],occur:19,odd:[7,15],off:[2,3,6,7,11,15,20],offset:13,offset_of:11,old:[2,6,8],old_siz:8,old_sum:8,omit:16,onc:[3,12,18,19],one:[2,3,4,5,6,7,9,10,11,12,13,15,16,19,24],ones:15,onli:[2,3,4,6,7,9,10,11,13,16,19,20],onto:[1,2,3,4,6,24],open:[4,12],oper:[3,4,10,16,19,24],oppos:9,option:1,order:[2,3,4,6,9,10,16,21],org:[4,19],origin:[0,1,2,3,6,9,19,20],other:[0,2,3,4,6,10,11,16,19,24],otherwis:[3,4,7,10,15,19],our:[4,7,9,10,11,15,16,21],ourselv:16,out:[2,3,4,5,6,7,11,15,16,19,20],outcom:19,output:[11,16],outsid:13,outward:11,over:[3,4,7,9,11,15,18,19,21],overhead:11,overkil:16,overshadow:11,own:[11,19],pack:[4,19,24],packag:[0,4],page:[0,18,19],pair:[2,3,6,7,9,10,15],pair_up:9,palidrom:7,palindrom:7,pam:[4,21],paper:[4,11,16,19,20],para:21,parallel:[2,6],param:[],paramet:[1,2,3,6,13,16,22],parameter:21,paramorph:21,paranthes:19,parenthes:[4,13,19,24],pariti:15,pars:[0,3,4,19,21],parse_definit:3,parseerror:[4,22],parser:[0,21],part:[2,3,6,10,13,16,19],partial:[11,16],particular:20,particularli:13,pass:[0,19,23],passphras:12,path:[11,21],pattern:[7,11,19,21],payoff:16,pe1:[7,15],pe2:15,pearl:20,pend:[3,4,5,16,20],per:[4,5,11],perform:13,perhap:15,period:[4,5],permit:[4,13,24],persist:19,phase:[2,6],pick:[7,15,24],pickl:4,pictur:19,piec:16,pip:0,pita:14,place:[3,4,7,11,13,16],plai:0,plain:13,plane:11,plu:[3,11,18],plug:[15,16,19],point:[4,11,16,19],pointless:[2,6],pop:[3,4,5,7,8,9,10,13,14,15,16,18,19,21,24],popd:[3,4,8,13,17,21],popdd:[3,4,10,15,18],popop:[3,4,7,9,10,13,14,15,16,17,19,21],port:11,posit:[3,4,5,7,13,16],possibilit:19,possibl:[10,19],post:[4,19],potenti:3,pow:[4,21],power:[4,21],pragmat:7,pre:[13,16,19],preambl:21,precis:[0,1,17],pred:[3,4,21],predic:[2,6,7,10,15,16,17,19],prefer:16,prefix:16,prep:[10,19],prepar:[13,16],preprocessor:16,present:19,pretti:[4,11,17,18,19,23,24],pretty_print:[0,5],prevent:16,previou:[4,11,13],pribrari:[],prime:10,primit:[2,3,6,8,13,18],primrec:[3,4,10,13,14,15,16,17,21],print:[1,2,3,5,6,11,16,23,24],print_:5,probabl:[4,9,15,19],problem:[4,11,21],proc_curr:19,proc_left:19,proc_right:19,proce:[7,9],process:[4,13,16],processor:19,produc:[7,9,16,19],product:[4,21],program:[0,2,3,4,6,9,10,11,13,15,17,19,20,21],programming_languag:[],project:21,prompt:4,proper:[2,3,6],properli:13,properti:0,provid:[0,3,4],prune:19,pun:[0,4],pure:[4,19],purely_functional_data_structur:4,puriti:4,purpos:4,push:[2,3,4,6,16,20,24],pushback:[4,19,24],put:[1,2,4,6,15,24],puzzl:[9,10,11,12],pypi:0,pyramid:11,python:[0,2,3,6,8,11,13,16,18,19,20,21,22,24],quadrat:[11,21],queri:19,queu:16,quit:[0,1,11],quot:[0,1,3,8,15,16,19,20,21,22],quotat:[2,3,6],quotient:3,rais:[4,19,22],random:13,rang:[4,7,11,16,21],range_sum:16,range_to_zero:[4,21],rank_and_offset:11,rank_of:11,rather:[4,7,16,19],ratio:4,reach:[7,13,15,16],read:[0,1,7,15,19,20],readabl:8,real:19,realiz:[9,13,19],realli:[8,11],rearrang:[2,6,16],reason:[4,7,11],rebuild:20,rec1:[2,3,6],rec2:[2,3,6],recogn:22,record:[4,5],recur:[16,17],recurs:[2,3,4,6,10,13,14,15,17,21,24],recusr:19,redefin:21,redistribut:[3,4],reduc:[2,6],redund:[4,24],reexamin:19,refactor:[4,7,16,21],refer:[0,2,6],refin:17,regist:[2,6],regular:22,rel:[13,18],relev:11,rem:[4,21],remain:[2,3,4,6],remaind:[3,4,21],remind:16,remov:[3,4,11,19,21],renam:19,render:[19,21],repeat:[7,9,11],repeatedli:7,repl:[0,1],replac:[2,3,4,6,15,16,17,20,21,24],repositori:0,repres:[2,4,6,19,22],represent:4,reprod:15,request:11,requir:[4,11,24],rescu:21,resembl:4,reset:21,respect:7,rest:[3,4,7,10,14,15,19,20,21,24],restor:[2,6],result:[1,2,3,5,6,7,10,15,16,18,19,20],resum:4,retir:[2,6],retri:4,reus:19,revers:[3,4,7,9,10,15,16,20,21],rewrit:[4,13],rewritten:4,richard:19,right:[4,5,11,15,16,21,24],rightmost:7,rkei:19,role:19,roll:[3,4,10,12,13,16,18,19,21],rolldown:[3,4,21],rollup:[3,4,21],root:[3,11,17],rotate_seq:9,round:9,row:[10,11],row_valu:11,rshift:[4,21],run:[0,1,3,4,7,11,16,19,20,21],runtim:[4,11],sai:19,same:[2,4,6,7,16,19,24],sandwich:[2,3,6],save:[2,4,6,7],scan:3,scanner:[4,22],scenario:20,scheme:19,scope:[9,19],script:[],search:[0,11,19],second:[3,4,9,10,16,19,21,24],secur:12,see:[0,4,8,11,15,16,19,20],seem:[0,4,7,14,19],seen:20,select:[3,4,11,21],semant:[2,3,4,6,19],semi:4,send:4,sens:[0,2,6,7,20],separ:[4,5],sequenc:[0,1,2,3,6,7,8,9,10,12,13,14,19,20,21,22],seri:[7,11,15,16,19,20],serv:16,set:[2,3,6,16,19],seven:[7,15],sever:[0,4],shadow:8,share:[3,4,11],shelf:[2,6],shift:[7,15],shine:13,shortest:11,should:[2,4,6,7,10,16,17,19],shouldn:4,show:[11,19,20],shunt:[3,4,20,21],side:19,sign:11,signal:10,signifi:[4,5,19],silli:19,similar:19,simon:4,simpl:[4,11,16,21,24],simplefunctionwrapp:[3,8,13,14,18],simplest:21,simplifi:[7,11,19,20,21],sinc:[2,6,7,11,18,19],singl:[3,4,8,15,22],situ:19,situat:19,six:[4,7,15],sixti:[7,15],size:[4,9,12,13,14,21],skeptic:4,skip:[11,13],slight:21,slightli:[16,19],small:[9,19],smallest:[3,10],smart:[13,16],sneaki:11,softwar:4,solei:[2,6],solut:[7,11],solv:11,solvabl:4,some:[0,2,3,4,10,11,13,15,16,19,24],somehow:19,someth:[2,6,9,13],sometim:19,somewher:[16,19],sophist:11,sort:[3,4,10,16,19],sort_:3,sourc:[0,1,3,22,23,24],space:[7,11],span:7,spec:[],special:[15,16,19],specif:0,speed:[8,11,13],sphinx:[],spiral:11,spirit:[0,1,19],split_at:9,spreadsheet:10,sqr:[4,17,18,20,21],sqrt:[3,4,11,18,21],squar:[3,4,11,17,22],stack:[0,1,3,5,7,8,10,13,14,15,16,17,18,19,20,21,23],stack_:3,stack_to_str:[4,5,24],stage:19,stai:[0,1],standard:4,star:19,stare:19,start:[4,7,10,11,13,14,15,16,17,19],state:[4,10,13],step:[3,4,5,7,8,9,10,11,12,18,19,20,21],step_zero:[9,10,12],still:[11,13,16],stop:19,storag:[7,16,19],store:[7,11,16],stori:16,str:22,straightforward:[1,9,11,15,21],strang:13,stream:7,string:[1,2,3,4,6,9,20,22,24],strip:11,structur:[4,16,20,21,24],stuff:19,style:0,sub:[4,21],subject:20,subract:11,substitut:[11,16],subtract:[7,10,11],succ:[3,4,21],suffici:[13,16],suggest:[10,19],suitabl:[3,7],sum:[3,4,9,10,15,16,19,21],sum_:[3,8],summand:7,suppli:[4,16,19,22],support:[4,11,23],sure:[11,16],suspect:[2,6],swaack:[3,4,8,16,18,19,20,21],swap:[3,4,7,8,9,10,11,12,14,15,16,19,20,21],swon:[3,4,14,15,16,19,20,21],swoncat:[4,13,14,15,16,19,21],symbol:[2,3,4,6,11,20,22],symmetr:7,sympi:21,syntact:4,syntax:[4,24],sys:11,system:[4,11,12,19],tail:[4,10,19,21,24],take:[3,4,7,9,11,13,15,18,19,21,24],taken:13,talk:[4,19,24],target:[11,20],task:11,tbd:[],technic:[2,6],techniqu:20,technolog:[2,6],teh:19,temporari:20,ten:7,term:[1,2,4,6,7,10,13,14,16,21,22,24],termin:[2,3,6,10],ternari:[4,21],test:[2,3,6],text:[0,1,3,4,5],text_to_express:[4,22],textual:4,than:[0,3,4,7,11,12,15,18,19],thei:[2,4,6,8,10,11,15,16,19,20,21,22,24],them:[2,3,4,6,7,8,10,11,15,16,19,20],theori:[2,3,6],therefor:[15,19],thi:[0,1,2,3,4,6,7,8,9,10,11,13,14,15,16,17,20,21,22,23,24],thing:[2,4,6,10,11,13,15,16,19,20,22,24],think:[2,4,6,7,13,16,19],third:[3,4,9,10,15,19,21],thirti:7,those:[2,3,6,10,11,13,16,19],though:[7,15,19],thought:4,thousand:7,thread:[2,6],three:[2,3,4,6,7,13,19,21],through:[1,4,7,20,24],thu:9,thun:[2,3,6],thunder:4,tied:19,tile:11,time:[3,4,7,11,13,14,16,19,20,21],tini:19,tkinter:[],to_set:19,todai:4,todo:[21,22],togeth:[4,15],tok:4,token:[4,22],tommi:19,too:[16,19],took:11,tool:4,top:[2,3,4,6,24],total:[7,9,11],total_match:9,trace:[0,4,5,18,20,21],traceprint:[5,23],track:20,tracker:0,trade:11,transform:16,translat:[11,16],travers:[20,21],treasur:0,treat:[2,3,6,21],treatment:15,tree:[4,21],treemap:16,treestep:[19,21],tri:7,triangular:21,trick:[7,19],tricki:[11,13,21],trivial:[10,13,19],trobe:0,trove:0,truediv:[4,18,21],truthi:[3,4,21],ts0:[16,19],ts1:[16,19],tuck:[3,4,5,10,17,19,21],tupl:[3,4,24],turn:[2,3,6,11],twice:[11,16,19],two:[2,3,4,5,6,7,10,11,16,17,19,20,21,24],type:[4,16,22],typic:[2,3,6],unari:[4,13,16,17,21],unarybuiltinwrapp:3,unbalanc:[4,22],unclos:4,uncon:[3,4,9,10,15,16,19,20,21],under:[2,3,4,6,13],understand:[0,11,19],undocu:4,unfinish:21,uniqu:[3,12,19],unit:[4,9,16,19,21],univers:[0,4],unless:[11,16],unlik:16,unnecessari:21,unpack:[2,3,4,6,24],unpair:7,unquot:[4,16,19,21],unstack:[3,4,21],untangl:[15,16],until:[10,11,13,15],unus:7,unusu:19,upward:13,usag:4,use:[0,2,3,4,6,7,8,11,13,15,18,19,20,24],used:[3,4,16,19,20,22,24],useful:[0,17],user:11,uses:[2,6,7,10,16],using:[3,10,11,15,16,19,20],usual:[0,2,6],util:[0,4,5,8,13,14,19],valid:12,valu:[2,3,4,6,7,8,10,11,16,17,21,24],value_n:19,vanilla:13,variabl:[16,21],variat:16,varient:19,varieti:4,variou:0,vener:[4,24],veri:[0,1,4,11,19,24],versa:[2,4,6],version:[0,1,2,6,15,20,21],via:4,vice:[2,6],viewer:[1,4,21,23],vise:4,von:[0,2,3,6],wai:[0,2,3,4,6,7,9,11,13,16,17,19],walk:19,wall:11,want:[2,6,7,11,13,15,17,19],warranti:[3,4],wash:4,wast:4,websit:0,welcom:4,well:[0,4,9,10,11,19,22],were:[4,11,13,16,20],what:[2,3,4,5,6,10,13,14,16,18,19,23],whatev:[2,3,4,6,15,19],when:[4,7,15,16,19,20,22,24],where:[2,3,4,6,9,10,13,16,19,24],whether:16,which:[0,1,3,4,7,10,11,13,16,19,20,24],who:[],whole:[2,3,6,7,10,19],whose:15,why:[11,17,19],wiki:[4,19],wikipedia:[0,4,19,20],wildli:4,wind:4,winner:11,wire:16,wit:13,within:[4,17,19],without:[2,6,19],won:19,word:[0,3,4,7,9,10,12,15,19,20,21],work:[0,4,7,9,10,11,13,15,16,19,20],worth:[7,11],would:[2,4,6,7,10,11,12,13,14,15,16,19,20,24],wouldn:13,wow:19,wrap:[3,11],write:[4,9,11,13,15,16,19,20,21],written:[0,1,8,13,24],wrong:[2,6],wtf:16,wtfmorphism:16,x80:[],xa2:[],xe2:[],xor:[4,21],year:4,yet:[4,13,16,19,20],yield:[2,3,4,6],you:[0,2,3,4,6,7,8,10,11,13,15,16,19,20],your:[2,3,4,6,9,10,11,12],yourself:[4,19],zero:[3,10,11,13,16,19,21,22,24],zip:[4,7,9,21],zip_:3,zipper:21,zstr:20},titles:["Thun 0.1.1 Documentation","Joy Interpreter","Functions Grouped by, er, Function with Examples","Function Reference","Joypy","Preamble","Examples (and some documentation) for the Words in the Library","Project Euler, first problem: \u201cMultiples of 3 and 5\u201d","Preamble","Advent of Code 2017","Advent of Code 2017","Advent of Code 2017","Advent of Code 2017","Advent of Code 2017","Advent of Code 2017","Using <code class=\"docutils literal notranslate\"><span class=\"pre\">x</span></code> to Generate Values","Hylomorphism","Newton\u2019s method","Quadratic formula","Treating Trees","Preamble","There are also some Jupyter notebooks.","Parsing Text into Joy Expressions","Tracing Joy Execution","Stack or Quote or Sequence or List\u2026"],titleterms:{"1st":9,"2nd":10,"3rd":11,"4th":12,"5th":13,"6th":14,"case":19,"final":10,"function":[2,3,4,14,16,18,19],"long":8,"void":[2,6],"while":[2,6],Adding:19,One:15,The:[4,7,16],There:21,Using:15,With:5,_print:[],abov:16,add:[2,6,13],address:20,advent:[9,10,11,12,13,14],aka:4,all:[11,13],also:21,ana:16,analysi:[7,11],anamorph:[2,6,16],app1:[2,6],app2:[2,6],app3:[2,6],appendix:16,automat:19,averag:[2,6],base:19,befor:14,better:16,binari:[2,6],block:10,branch:[2,6],breakdown:13,btree:19,cata:16,catamorph:16,chatter:[2,6],check:18,choic:[2,6],clear:[2,6],cleav:[2,6],cmp:19,code:[9,10,11,12,13,14],codicil:18,combin:[2,6,16,19],comparison:[2,6],compil:[8,15],con:[2,6,19],concat:[2,6],continu:4,count:[13,14],crap:19,current:19,data:19,decemb:[9,10,11,12,13,14],defin:18,definit:18,delet:19,deriv:[16,18,19],determin:20,dialect:0,dip:[2,6,20],dipd:[2,6],dipdd:[2,6],direco:15,disenstacken:[2,6],div:[2,6],document:[0,6],doe:19,down:10,down_to_zero:[2,6],drive:14,drop:[2,6],dup:[2,6],dupd:[2,6],dupdip:[2,6],enstacken:[2,6],etc:4,euler:[7,15],eval:4,even:15,exampl:[2,6],execut:23,express:22,extract:16,factor:[16,19],factori:16,fibonacci:15,find:[11,16],first:[2,6,7],five:15,flatten:[2,6],floordiv:[2,6],form:[16,19],formula:18,four:16,from:16,ftw:9,fun:16,further:7,fusion:16,gcd:[2,6],gener:[7,14,15,16,19],genrec:[2,6],get:[13,19],getitem:[2,6],given:16,gotten:13,group:2,help:[2,6],here:7,host:0,how:[14,15],hylo:16,hylomorph:16,ift:[2,6],increment:13,index:13,indic:0,inform:0,infra:[2,6,20],intern:22,interpret:[1,4],item:20,iter:[7,19],joi:[0,1,3,4,11,16,20,22,23,24],joypi:4,jupyt:21,just:19,kei:19,languag:0,law:16,least_fract:[2,6],left:19,librari:[3,4,6],list:[2,4,6,16,19,24],littl:7,logic:[2,6],loop:[2,4,6,10],lshift:[2,6],make:19,mani:14,map:[2,6],math:[2,6],method:17,min:[2,6],miscellan:[2,6,19],mod:[2,6],modif:19,modul:[],modulu:[2,6],mul:[2,6],multipl:[7,15],name:[18,19],nativ:18,neg:[2,6],newton:17,node:[16,19],notebook:21,now:13,nullari:[2,6],number:[11,16],offset:11,order:19,osdn:0,our:19,out:10,over:[2,6],pam:[2,6],paper:10,para:16,paramet:19,parameter:[16,19],paramorph:16,pars:[2,6,22],parser:[4,22],pass:4,path:20,pattern:16,per:19,piec:10,pop:[2,6],popd:[2,6],popop:[2,6],pow:[2,6],power:15,preambl:[5,8,13,16,20],pred:[2,6],predic:13,pretti:[],pretty_print:23,primrec:[2,6],print:4,problem:[7,15],process:19,product:[2,6],program:[5,7,14,16,18],project:[0,7,15],put:[11,19],pypi:[],python:4,quadrat:18,quick:0,quot:[2,4,6,24],rang:[2,6],range_to_zero:[2,6],rank:11,read:4,recal:14,recur:19,recurs:[16,19],redefin:19,refactor:[9,19],refer:3,rem:[2,6],remaind:[2,6],remov:[2,6],render:7,repeat:14,repl:4,replac:8,rescu:11,reset:15,rest:[2,6,16],revers:[2,6],right:[19,20],roll:[2,6],rolldown:[2,6],rollup:[2,6],rshift:[2,6],run:[2,5,6,15],sat:10,second:[2,6],select:[2,6],sequenc:[4,15,24],set:13,shunt:[2,6],simpl:5,simplest:7,simplifi:18,size:[2,6,8],slight:19,some:[5,6,21],sqr:[2,6],sqrt:[2,6],stack:[2,4,6,24],start:0,state:14,step:[2,6,13,16],straightforward:18,structur:19,style:4,sub:[2,6],succ:[2,6],sum:[2,6,7,8],swaack:[2,6],swap:[2,6],swon:[2,6],swoncat:[2,6],symbol:16,sympi:11,tabl:0,tail:16,take:[2,6],term:[15,19],ternari:[2,6],text:22,than:16,thei:7,thi:19,think:10,third:[2,6],three:15,thun:0,time:[2,6,15],todo:19,togeth:[11,13,19],trace:[8,23],traceprint:4,travers:19,treat:19,tree:[16,19,20],treestep:16,triangular:16,tricki:10,truediv:[2,6],truthi:[2,6],tuck:[2,6],two:15,type:19,unari:[2,6],uncon:[2,6],unfinish:16,unit:[2,6],unnecessari:7,unquot:[2,6],unstack:[2,6],use:16,usual:16,util:[23,24],valu:[13,15,19],variabl:18,version:[7,8,11,19],view:4,viewer:5,want:10,word:[2,6],write:18,xor:[2,6],zero:15,zip:[2,6],zipper:20}})
\ No newline at end of file
+Search.setIndex({docnames:["index","joy","lib","library","notebooks/0. This Implementation of Joy in Python","notebooks/4. Replacing Functions in the Dictionary","notebooks/Advent of Code 2017 December 1st","notebooks/Advent of Code 2017 December 2nd","notebooks/Advent of Code 2017 December 3rd","notebooks/Advent of Code 2017 December 4th","notebooks/Advent of Code 2017 December 5th","notebooks/Advent of Code 2017 December 6th","notebooks/Developing","notebooks/Generator Programs","notebooks/Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators","notebooks/Newton-Raphson","notebooks/Quadratic","notebooks/Trees","notebooks/Zipper","notebooks/index","parser","pretty","stack"],envversion:52,filenames:["index.rst","joy.rst","lib.rst","library.rst","notebooks/0. This Implementation of Joy in Python.rst","notebooks/4. Replacing Functions in the Dictionary.rst","notebooks/Advent of Code 2017 December 1st.rst","notebooks/Advent of Code 2017 December 2nd.rst","notebooks/Advent of Code 2017 December 3rd.rst","notebooks/Advent of Code 2017 December 4th.rst","notebooks/Advent of Code 2017 December 5th.rst","notebooks/Advent of Code 2017 December 6th.rst","notebooks/Developing.rst","notebooks/Generator Programs.rst","notebooks/Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators.rst","notebooks/Newton-Raphson.rst","notebooks/Quadratic.rst","notebooks/Trees.rst","notebooks/Zipper.rst","notebooks/index.rst","parser.rst","pretty.rst","stack.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,""],concat:[3,1,1,""],cons:[3,1,1,""],dip:[3,1,1,""],dipd:[3,1,1,""],dipdd:[3,1,1,""],divmod_:[3,1,1,""],drop:[3,1,1,""],dup:[3,1,1,""],dupd:[3,1,1,""],dupdip:[3,1,1,""],first:[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,""],ifte:[3,1,1,""],infra:[3,1,1,""],initialize:[3,1,1,""],inscribe:[3,1,1,""],loop:[3,1,1,""],map_:[3,1,1,""],max_:[3,1,1,""],min_:[3,1,1,""],over:[3,1,1,""],parse:[3,1,1,""],pm:[3,1,1,""],pop:[3,1,1,""],popd:[3,1,1,""],popdd:[3,1,1,""],popop:[3,1,1,""],pred:[3,1,1,""],remove:[3,1,1,""],rest:[3,1,1,""],reverse:[3,1,1,""],rolldown:[3,1,1,""],rollup:[3,1,1,""],select:[3,1,1,""],sharing:[3,1,1,""],shunt:[3,1,1,""],sort_:[3,1,1,""],sqrt:[3,1,1,""],stack_:[3,1,1,""],step:[3,1,1,""],succ:[3,1,1,""],sum_:[3,1,1,""],swaack:[3,1,1,""],swap:[3,1,1,""],take:[3,1,1,""],times:[3,1,1,""],tuck:[3,1,1,""],uncons:[3,1,1,""],unique:[3,1,1,""],unstack:[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:[20,4,1,""],Symbol:[20,2,1,""],text_to_expression:[20,1,1,""]},"joy.utils":{pretty_print:[21,0,0,"-"],stack:[22,0,0,"-"]},"joy.utils.pretty_print":{TracePrinter:[21,2,1,""]},"joy.utils.pretty_print.TracePrinter":{viewer:[21,5,1,""]},"joy.utils.stack":{expression_to_string:[22,1,1,""],iter_stack:[22,1,1,""],list_to_stack:[22,1,1,""],pick:[22,1,1,""],pushback:[22,1,1,""],stack_to_string:[22,1,1,""]},joy:{joy:[1,0,0,"-"],library:[3,0,0,"-"],parser:[20,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","classmethod","Python class method"],"4":["py","exception","Python exception"],"5":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:classmethod","4":"py:exception","5":"py:method"},terms:{"0b11100111011011":12,"0th":4,"10m":14,"10n":14,"4ac":16,"5bkei":17,"\u03b5":15,"abstract":[4,17],"boolean":[2,3,4,17],"break":[4,11],"byte":12,"case":[2,3,4,5,7,11,14,22],"class":[3,4,20,21],"default":[3,10,13],"export":[3,4,20],"final":[2,8,14],"float":[3,4,18,20],"function":[0,1,5,6,7,8,9,10,12,13,15,18,19,20,21,22],"g\u00e9rard":18,"import":[2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],"int":[4,8,13,14,18,20],"new":[2,3,4,5,8,13,14,17],"return":[1,3,4,5,7,8,10,11,12,14,16,17,20,22],"short":16,"static":2,"switch":2,"true":[2,3,7,8,12,14,17],"try":[4,8,13,14],"void":[0,3,4],"while":[3,4,8,10,11,20],Adding:[4,19],And:[4,6,8,12,13,14,15,17,18],But:[0,4,7,12,14,17],For:[2,3,4,6,7,8,9,10,13,14,17,22],Going:7,Has:3,Its:3,Not:8,One:[2,4],RHS:17,TOS:[2,3,14],That:[4,12,14,17],The:[0,1,2,3,5,6,7,8,9,10,13,15,16,18,19,20,22],Then:[2,3,7,10,16,17],There:[0,4,8,10,14,17],Use:[3,14],Using:[8,14,17],With:[6,14],_pars:4,aaa:9,abbrevi:17,about:[0,4,8,10,17,18,22],abov:[0,5,8,12,15,16,17],abs:[8,15],absolut:[4,8],accept:[1,2,3,4,12,14,17,18],access:[8,10],accomplish:16,accordingli:17,accumul:12,across:[8,10],action:[4,18],actual:[2,4,8,12,17],add:[3,4,6,7,8,12,13,16,21],add_alias:3,add_def:3,add_definit:[3,10,14,17],add_if_match:6,add_valu:10,added:17,adding:8,addit:[0,2,3,4,10,12,14,17],admit:8,advantag:14,after:[4,6,8,10,12,13],afterward:4,again:[2,3,4,8,10,12,17],against:[7,8],aggreg:[3,4,18],aka:18,albrecht:0,algebra:17,algorithm:4,alia:3,alias:[3,4],align:4,all:[3,4,6,7,12,13,14,15,17],alloc:8,allow:[14,17],almost:17,alon:15,along:[4,14],alphabet:3,alreadi:[5,8,18],also:[0,4,12,14],altern:17,although:[6,17],altogeth:13,alwai:[8,12,14],amort:17,amount:8,analysi:19,anamorph:4,ani:[4,10,12,17,18,20],annual:4,anonym:17,anoth:[6,14,17],answer:8,anyth:[2,3,4],aoc20017:7,aoc20173:8,aoc2017:[6,7,8,9,10,11],app1:[3,4],app2:[3,4,5,7,16],app3:[3,4],app:4,appear:[2,9,12,17],append:[4,10],appli:[2,3,7,12,15,17],applic:13,approach:12,archiv:0,aren:18,arg:[2,3],argument:[2,3,4,13,14,22],arithmet:2,ariti:2,around:[4,12,22],arrai:10,arrang:10,arriv:[13,17],articl:0,ask:[8,13],aspect:[0,8],assembl:10,assert:[8,11],assign:[4,22],associ:17,assum:[6,7,9,10],asterisk:17,attack:4,attempt:[0,1],attribut:3,automat:[14,19],avail:[0,9],averag:[4,5],avoid:17,awar:2,awkward:17,back:[8,10,17],backward:[4,17],bad:4,bag:4,banana:[14,17],bank:11,barb:14,base:[2,3,7,11,14],basic:[1,2,3,4,6,8,17],bear:10,beat:10,becaus:[2,3,4,6,7,8,10,14,17,18],becom:[4,6,16,17,22],been:[14,17,18],befor:[4,7,10,13,14,17],begin:[8,14,17],behavior:17,behaviour:[0,1],behind:10,being:0,belong:10,below:[2,3,8,12,13,15,17,18],bespok:4,best:0,better:[8,12,13,17],between:[0,7,8,12],biannual:4,big:[8,10,17],binari:[0,4,13,17],binary_search_tre:17,binarybuiltinwrapp:3,bind:4,bingo:18,bit:[8,12,13,17],block:[11,12],bodi:[2,4,17],body_text:3,bool:[7,14],both:[2,4,5,8,10,12,14,15],bottom:13,boundari:8,bracket:[4,8,20],branch:[3,4,6,7,10,12,13,15,17],breakpoint:4,bring:[4,12],btree:19,buck:17,bug:[0,4],build:[4,14,17,18],built:14,bundl:[2,3],burgeon:4,calcul:8,call:[2,4,14],caller:17,came:[10,17],can:[0,2,3,4,5,6,7,8,12,13,14,15,16,18,22],candid:7,captur:4,card:4,care:[4,8,12,22],carefulli:[17,18],carri:[6,8,14],catamorph:5,ccon:17,ceil:8,certain:[4,22],certainli:17,chang:[2,8,10,17,18],charact:18,chat:4,chatter:0,cheat:11,check:[7,13,14],checksum:7,child0:17,childn:17,children:17,choic:[3,4,14],choos:17,circular:[6,17],cite_not:17,classmethod:3,clear:[3,4,8,12],cleav:[4,5,6,7,9,16],close:[0,1,4],clunki:12,cmp:19,cmp_:17,code:[0,1,4,14,15,17],collaps:14,collect:[4,13],column:8,combin:[0,3,4,9,12,13,18,19],come:[4,8,10],command:[4,6,17],common:[2,12,14],compar:8,comparison:0,compil:[2,4,10,14],complex:[3,18],compos:14,compound:17,comput:[2,4,7,8,10,12,19],con:[3,4,7,10,11,12,13,14,16,18,22],concat:[3,4,6,13,14,17],concatin:[3,22],concis:8,concret:14,concurr:2,condit:[4,10],condition:7,confid:8,conflict:17,cons2:17,consecut:13,consid:[10,12,13,14,17,18],consist:[2,4,8,17],constant:17,constitu:14,consum:[7,14],contain:[0,2,3,4,8,9,13,14],context:2,continu:[0,7,14,18],control:4,convert:[4,5,14,17,20,22],cook:14,cool:17,copi:[2,3,6,12,14,17],copyright:4,corner:8,correct:8,correctli:17,could:[2,4,8,10,12,14,17,18],count:[3,8,9,13],count_stat:11,counter:12,cours:[8,10,12,14,17],cover:8,cpu:8,crack:17,crap:19,crash:17,creat:[0,2,3,6,12,13,14,17],crude:[17,20],csp:4,current:[2,3,4,10,14,18],cycl:[12,13],cython:4,dai:[4,14],data:[2,3,4,8,19],datastructur:[2,4,14,18,20,22],datatyp:[4,22],ddididi:18,deal:[0,6,17],debugg:14,decid:17,decor:3,decoupl:14,decreas:8,decrement:3,deduc:12,deeper:0,def:[3,4,5,8,10,11,14,16,17,22],defi:3,defin:[2,3,4,6,7,8,9,10,11,12,13,14,15,18],definit:[2,3,4,5,9,10,12,13,14,17,19],definitionwrapp:[3,10,14,17],deleg:4,delet:19,demonstr:14,depend:[14,17],deposit:17,dequot:[6,14],deriv:[2,3,4,6,7,12,19],descend:7,describ:[3,4,14,17,20],descript:[4,12,17],design:[2,3,7,17],desir:[4,8,17],destruct:17,detail:[4,8,17],detect:[7,13,14,17],determin:[7,8],develop:[0,4,13,19],diagram:12,dialect:1,dict:[1,3],dictionari:[1,3,4,5,16,17],did:8,didn:14,differ:[0,7,9,12,14,17],dig:18,digit:[6,12],dimension:8,dinfrirst:4,dip:[3,4,5,7,8,10,11,12,13,14,15,16,17],dipd:[3,4,10,13,14,16,17,18],dipdd:[3,4,17],direco:11,direct:4,directli:[4,8,12,17,22],disappear:2,discard:[3,13,14,15,17],discov:7,disenstacken:[4,17],disk:4,displac:2,distanc:8,distribut:11,ditch:17,div:[3,4],dive:17,divid:7,divis:[7,17],divisor:7,divmod:[3,7],divmod_:3,doc:[2,3,4],document:20,doe:[0,1,4,7,8,10,14,19,21],doesn:[4,6,10,12,14,17,22],dog:17,doing:[4,8,12,14,18],domain:8,don:[7,8,10,12,17],done:[2,4,12,13],doodl:8,door:4,doubl:12,down:[2,3,8,10,18],down_to_zero:4,downward:10,dozen:4,draft:11,dream:4,drive:13,driven:12,driver:13,drop:[3,6,17],dudipd:4,due:6,dummi:7,dup:[3,4,6,7,8,10,11,12,13,14,15,16,17,18,22],dupd:[3,4],dupdip:[3,4,7,8,12,14,16,17],duplic:[3,9,14,17],durat:2,dure:[2,5,14],each:[2,3,4,5,6,7,8,10,12,14,17],easi:[0,8,15,17,18],easier:[3,6,17],effect:[2,3,4,18],effici:[8,10,18],either:[1,2,3,7,14,17],eleg:[4,10,16,17],element:[2,3],elif:4,els:[2,3,4,6,7,10,11,14],embed:[17,18],empti:[3,4,7,22],enabl:4,encapsul:4,enclos:4,encod:[10,13],encount:10,end:[4,8,10,12,14,22],endless:13,enforc:[2,4],engend:4,enlarg:8,enough:[4,8,14,16],enstacken:[4,13],ensur:9,enter:4,entri:[3,18],equal:12,equat:[4,8,15],ergo:[8,14,17],err:[15,17],error:[4,8,19,20],escap:10,essai:0,estim:15,etc:[3,8,18,20],euler:19,evalu:[1,2,3,4,5,6,14,17],even:10,evenli:7,eventu:8,everi:13,everyth:[3,17],exactli:14,exampl:[0,3,4,6,7,8,9,10,12,13,14,17,20,22],exce:13,except:[4,17,20],execut:[0,1,2,3,4,5,7,15,18],exit:10,expect:[2,3,4,7,14,15,17,22],experi:4,experiment:8,explan:4,explor:4,express:[0,1,2,3,4,5,14,17,18,21,22],expression_to_str:[4,22],extend:8,extra:[4,6,7,12],extrem:4,extrememli:4,facet:0,facil:4,fact:[17,20],factor:[2,4,12,19],fail:[2,3,7,17,20],fals:[2,3,7,11,12,14],far:[10,14,17],fascin:0,fast:8,faster:8,fear:17,feel:8,few:[4,8,12],fewer:[3,4],fib:13,fib_gen:13,figur:[2,3,8,17],filter:17,fin:12,find:[2,3,6,7,12,13,17,19,22],fine:[0,12,17],first:[3,4,5,6,7,8,10,11,13,14,16,17,18,19],fit:[4,12,16],five:[4,12,14],fix:[2,3],flag:7,flatten:[4,17],flexibl:17,floor:[3,8],floordiv:[4,12],flow:4,follow:[0,2,3,4,7,10,14,18],foo:17,form:[2,3,4,7,9,12,13,19,22],forman:4,format:21,formula:[0,8,12,19],forth:[4,6,10,17],fortun:10,forum:0,forward:[7,10],found:[4,10,11,17],four:[2,3,4,8,10,12,13,17],fourteen:12,fourth:[2,3,6,17],fractal:4,fraction0:4,fraction:[2,4],fragment:15,frame:4,framework:4,free:[4,17],freeli:[2,8],from:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,22],front:[2,3],full:[9,12],fun:8,functionwrapp:[3,17],funtion:17,further:19,futur:16,garbag:4,gari:17,gcd:4,gen:11,gener:[2,3,4,8,10,15,19],genrec:[3,4,7,10,14,15,17],geometr:12,geometri:17,get:[2,4,5,7,8,12,13,14,15,19],get_valu:10,getdoc:4,getitem:[3,4],getsourc:4,give:[4,8,12,14,22],given:[2,3,5,6,7,8,10,11,12,13,18],glue:4,goal:10,going:[7,8,10,17,18],good:[10,12,17],grab:3,grammar:20,grand:4,graph:8,great:[0,4,6,8],greater:8,grid:8,group:[0,8],guard:[7,8],had:[12,18],haiku:4,half:[12,18],half_of_s:6,halfwai:6,hand:[4,5,17],happen:[4,8,17],hard:[15,18],hardli:14,has:[0,2,4,7,8,10,13,14,17,18,22],have:[2,3,4,6,7,8,10,11,12,13,14,17,18],head:[4,7,14,22],help:[4,5,9,14,17],help_:3,helper:[3,7],herd:4,here:[8,12,13,14,15,17,18],heterogen:17,heurist:[6,10],hide:17,higher:[4,17],highest:7,highli:[4,17],hindsight:7,hmm:17,hog:17,hoist:3,hold:12,hood:10,hope:[0,4,12],how:[0,8,9,10,14,17,18],html:[2,3,13,16],http:[4,17],huet:18,hugh:[15,17],human:4,hypothet:2,id_:3,idea:[4,12,17],ident:[3,14],identifi:8,ift:[3,4,6,7,10,14,15,17],ignor:[3,17],illustr:14,imagin:18,immedi:[10,14],immut:[4,17],imper:14,implement:[0,1,2,3,4,8,11,14,16,17],impli:7,implicit:4,includ:9,inclus:12,incom:[4,22],incr_at:10,incr_step_count:10,incr_valu:10,increas:[8,10,12],increment:[3,12],index:[0,4,8,11],index_of:11,indexerror:4,indic:17,infil:17,infinit:8,inform:3,infra:[3,4,5,13,14,16],infrastructur:3,init:10,init_print:8,initi:[2,3,4,5,7,8,9,10,17],inlin:17,inner:7,input:[1,6,7,8,9,14],inscrib:3,inspect:4,instal:0,instead:[8,12,13,14,17,18],instruct:10,integ:[2,3,4,6,7,8,9,10,13,14],integr:3,intend:[0,4],interact:4,interest:[0,8,12,13,17],interlock:8,interlud:19,intermedi:14,intern:0,interpret:[0,14,20],interrupt:4,interv:12,invari:3,invers:3,ipf:4,ipynb:13,isinst:4,isn:[14,18],item:[2,3,4,6,7,11,14,17,22],iter:[1,3,4,8,14,19,22],iter_stack:[4,5,11,22],its:[0,2,3,4,7,8,12,14,17,22],itself:[0,2,4,10,17],j05cmp:[2,3],jenni:17,job:10,john:[15,17],joi:[2,5,6,7,9,10,11,16,17],join:4,joypi:[10,11,14,17,18],jump:10,jupyt:0,just:[0,2,3,4,6,7,8,10,13,14,18],keep:18,kei:19,kevin:0,key_n:17,keyerror:17,kind:[2,4,8,10,14,17],kleen:17,know:[8,12,14,17],lambda:14,lambdifi:8,languag:[4,17],larg:8,larger:8,largest:[3,7,10],last:[6,10,12,14],lastli:[13,14],later:[4,10,15],law:2,lcm:12,lead:[4,10],leaf:17,lean:4,learn:[0,11],least:[2,4,8,10,12,14,22],least_fract:4,leav:[7,8,10,12,13,15,17],left:[4,8,13,14,18,22],leftov:14,legendari:10,legibl:10,len:11,length:[3,12],lens:14,less:[4,12,13,14],lesser:8,let:[4,6,7,8,10,13,14,15,16,17,18],level:17,librari:[0,5,8,10,11,16,17],lieu:17,like:[2,3,4,7,8,11,12,14,16,20],line:[3,4,7,10,14,17],linear:22,link:0,linux:0,list:[0,3,6,7,9,10,11,12,18,19],list_to_stack:[4,10,11,22],liter:[1,17,18,20],littl:[8,10,17,19],lkei:17,load:[4,12],locat:[2,8],log_2:17,logic:[0,12],longer:17,look:[4,8,13,17],lookup:[4,17],loop:[1,3,12],lot:[4,16,17,18],love:12,lower:12,lowest:7,lshift:4,machin:[0,17],machineri:17,macro:4,made:[0,4,7,17,18],mai:[2,4,10,14,17],mail:0,main:[0,3,4,6,18],maintain:18,make:[2,3,4,5,6,12,14,18],make_distributor:11,manfr:[0,2,3],manhattan:8,mani:[0,4,8,9,10,13,14],manipul:8,manual:[8,14],map:[1,3,4,12,14,17],map_:3,mark:[8,10],marker:4,mask:[12,13],match:[0,1,6],materi:0,math:[0,4,8,10,17],mathemat:[4,8],matter:[6,12,14,15,17],max:[7,8,11],max_:3,maximum:[3,17],maxmin:7,mayb:[14,17],maze:10,mean:[4,7,12,14,17,22],meant:[4,14,17],meantim:10,mem:10,member:[2,3,8],memori:8,mental:4,mention:2,mercuri:0,merg:17,meta:[4,17],methink:17,method:[0,3,4,8,19,21],mfloor:8,midpoint:12,might:[6,13,14,17],million:13,min:[4,7],min_:3,mind:10,minimum:3,minu:[3,16],mirror:0,miscellan:[0,19],mistak:11,mix:4,mnemon:6,mod:[3,4],model:4,modern:0,modif:13,modifi:[4,10,18],modul:[0,1,3,4,20],modulu:4,monkei:8,month:4,more:[0,3,4,5,9,10,12,13,14,16,17,20,22],most:[4,17],mostli:0,move:[6,8,10],movement:2,mrank_of:8,much:[4,8,10,12,14,17],muck:17,mul:[4,16,18,21],multi:3,multipl:[14,19],must:[2,3,7,8,9,12,14],mutabl:10,n_kei:17,n_rang:13,n_valu:17,nail:10,name:[1,3,4,5,6,18,19,20,22],natur:[12,13,17],navig:18,need:[2,3,6,7,8,10,11,12,13,14,15,17],neg:[3,4,10,16],nest:[4,17,18],network:4,newton:[0,19],next:[5,6,7,8,10,12,14,15,17],nice:[0,4,6,8,14,22],niether:2,node:19,non:[7,17],none:[1,3,4],normal:[9,14],notat:[4,17],note:[2,4,8,12,17,22],notebook:[0,4,12,18],notebook_preambl:[2,5,6,7,8,9,10,11,12,13,14,15,16,17,18],noth:[2,4,17],notic:12,now:[4,5,6,7,8,12,13,14,15],nth:[3,22],nullari:[4,7,10,11,15,17],number:[1,2,3,5,7,12,13,19,22],object:20,observ:12,obviou:[13,15],obvious:[7,9,10],occur:17,odd:[12,13],off:[2,3,8,12,13,18],offset:10,offset_of:8,old:[2,5],old_siz:5,old_sum:5,omit:14,onc:[3,9,16,17],one:[2,3,4,6,7,8,9,10,12,13,14,17,22],ones:13,onli:[2,3,4,6,7,8,10,12,14,17,18],onto:[1,2,3,4,22],open:[4,9],oper:[3,4,7,14,17,22],oppos:6,option:1,order:[2,3,4,6,7,14,19],org:[4,17],origin:[0,1,2,3,6,17,18],other:[0,2,3,4,7,8,14,17,22],otherwis:[3,4,7,12,13,17],our:[4,6,7,8,12,13,14],ourselv:14,out:[2,3,4,8,12,13,14,17,18],outcom:17,output:[8,14],outsid:10,outward:8,over:[3,4,6,8,12,13,16,17],overhead:8,overkil:14,overshadow:8,own:[8,17],pack:[4,17,22],packag:[0,4],page:[0,16,17],pair:[2,3,6,7,12,13],pair_up:6,palidrom:12,palindrom:12,pam:4,paper:[4,8,14,17,18],parallel:2,paramet:[1,2,3,10,14,20],paranthes:17,parenthes:[4,10,17,22],pariti:13,pars:[0,3,4,17],parse_definit:3,parseerror:[4,20],parser:0,part:[2,3,7,10,14,17],partial:[8,14],particular:18,particularli:10,pass:[0,17,21],passphras:9,path:8,pattern:[8,12,17],payoff:14,pe1:[12,13],pe2:13,pearl:18,pend:[3,4,14,18],per:[4,8],perform:10,perhap:13,period:4,permit:[4,10,22],persist:17,phase:2,pick:[12,13,22],pickl:4,pictur:17,piec:14,pip:0,pita:11,place:[3,4,8,10,12,14],plai:0,plain:10,plane:8,plu:[3,8,16],plug:[13,14,17],point:[4,8,14,17],pointless:2,pop:[3,4,5,6,7,10,11,12,13,14,16,17,22],popd:[3,4,5,10,15],popdd:[3,4,7,13,16],popop:[3,4,6,7,10,11,12,13,14,15,17],port:8,posit:[3,4,10,12,14],possibilit:17,possibl:[7,17],post:[4,17],potenti:3,pow:4,power:4,pragmat:12,pre:[10,14,17],precis:[0,1,15],pred:[3,4],predic:[2,7,13,14,15],prefer:14,prefix:14,prep:[7,17],prepar:[10,14],preprocessor:14,present:17,pretti:[4,8,15,16,17,21,22],pretty_print:0,prevent:14,previou:[4,8,10],prime:7,primit:[2,3,5,10,15,16],primrec:[3,4,7,10,11,13,14,15],print:[1,2,3,8,14,21,22],probabl:[4,6,13,17],problem:[4,8,19],proc_curr:17,proc_left:17,proc_right:17,proce:[6,12],process:[4,10,14],processor:17,produc:[6,12,14,17],product:4,program:[0,2,3,4,6,7,8,10,13,15,18],project:19,prompt:4,proper:[2,3],properli:10,properti:0,provid:[0,3,4],prune:17,pun:[0,4],pure:[4,17],purely_functional_data_structur:4,puriti:4,purpos:4,push:[2,3,4,14,18,22],pushback:[4,17,22],put:[1,2,4,13,22],puzzl:[6,7,8,9],pypi:0,pyramid:8,python:[0,2,3,5,8,10,14,16,17,18,20,22],quadrat:[0,8,19],queri:17,queu:14,quit:[0,1,8],quot:[0,1,3,5,13,14,17,18,20],quotat:[2,3],quotient:3,rais:[4,17,20],random:10,rang:[4,8,14],range_sum:14,range_to_zero:4,rank_and_offset:8,rank_of:8,raphson:15,rather:[4,12,14,17],ratio:4,reach:[10,12,13,14],read:[0,1,12,13,17,18],readabl:5,real:17,realiz:[6,10,17],realli:[5,8],rearrang:[2,14],reason:[4,8,12],rebuild:18,rec1:[2,3],rec2:[2,3],recogn:20,record:4,recur:14,recurs:[2,3,4,7,10,11,13,15,19,22],recusr:17,redistribut:[3,4],reduc:2,redund:[4,22],reexamin:17,refactor:[4,14],refer:[0,2],refin:15,regist:2,regular:20,rel:[10,16],relev:8,rem:4,remain:[2,3,4],remaind:[3,4],remind:14,remov:[3,4,8,17],renam:17,render:[17,19],repeat:[6,8,12],repeatedli:12,repl:[0,1],replac:[2,3,4,13,14,15,18,22],repositori:0,repres:[2,4,17,20],represent:4,reprod:13,request:8,requir:[4,8,22],resembl:4,respect:12,rest:[3,4,7,11,12,13,17,18,22],restor:2,result:[1,2,3,7,12,13,14,16,17,18],resum:4,retir:2,retri:4,reus:17,revers:[3,4,6,7,12,13,14,18],rewrit:[4,10],rewritten:4,richard:17,right:[4,8,13,14,22],rightmost:12,rkei:17,role:17,roll:[3,4,7,9,10,14,16,17],rolldown:[3,4],rollup:[3,4],root:[3,8,19],rotate_seq:6,round:6,row:[7,8],row_valu:8,rshift:4,run:[0,1,3,4,8,12,14,17,18],runtim:[4,8],sai:17,same:[2,4,12,14,17,22],sandwich:[2,3],save:[2,4,12],scan:3,scanner:[4,20],scenario:18,scheme:17,scope:[6,17],search:[0,8,17],second:[3,4,6,7,14,17,22],secur:9,see:[0,4,5,8,13,14,17,18],seem:[0,4,11,12,17],seen:18,select:[3,4,8],semant:[2,3,4,17],semi:4,send:4,sens:[0,2,12,18],separ:4,sequenc:[0,1,2,3,5,6,7,9,10,11,12,17,18,20],seri:[8,12,13,14,17,18],serv:14,set:[2,3,14],seven:[12,13],sever:[0,4],shadow:5,share:[3,4,8],shelf:2,shift:[12,13],shine:10,shortest:8,should:[2,4,7,12,14,15,17],shouldn:4,show:[8,17,18],shunt:[3,4,18],side:17,sign:8,signal:7,signifi:[4,17],silli:17,similar:17,simon:4,simpl:[4,8,14,22],simplefunctionwrapp:[3,5,10,11,16],simplest:19,simplifi:[8,12,17,18],sinc:[2,8,12,16,17],singl:[3,4,5,13,20],situ:17,situat:17,six:[4,12,13],sixti:[12,13],size:[4,6,9,10,11],skeptic:4,skip:[8,10],slightli:[14,17],small:[6,17],smallest:[3,7],smart:[10,14],sneaki:8,softwar:4,solei:2,solut:[8,12],solv:8,solvabl:4,some:[0,2,3,4,7,8,10,13,14,17,22],somehow:17,someth:[2,6,10],sometim:17,somewher:[14,17],sophist:8,sort:[3,4,7,14,17],sort_:3,sourc:[0,1,3,20,21,22],space:[8,12],span:12,special:[13,14,17],specif:0,speed:[5,8,10],spiral:8,spirit:[0,1,17],split_at:6,spreadsheet:7,sqr:[4,15,16,18],sqrt:[3,4,8,16],squar:[3,4,8,19,20],stack:[0,1,3,5,7,10,11,12,13,14,15,16,17,18,21],stack_:3,stack_to_str:[4,22],stage:17,stai:[0,1],standard:4,star:17,stare:17,start:[4,7,8,10,11,12,13,14,17],state:[4,7,10],step:[3,4,5,6,7,8,9,12,16,17,18],step_zero:[6,7,9],still:[8,10,14],stop:17,storag:[12,14,17],store:[8,12,14],stori:14,str:20,straightforward:[1,6,8,13,19],strang:10,stream:12,string:[1,2,3,4,6,18,20,22],strip:8,structur:[4,14,17,18,22],stuff:17,style:0,sub:4,subject:18,subract:8,substitut:[8,14],subtract:[7,8,12],succ:[3,4],suffici:[10,14],suggest:[7,17],suitabl:[3,12],sum:[3,4,6,7,13,14,17],sum_:[3,5],summand:12,suppli:[4,14,17,20],support:[4,8,21],sure:[8,14],suspect:2,swaack:[3,4,5,14,16,17,18],swap:[3,4,5,6,7,8,9,11,12,13,14,17,18],swon:[3,4,11,13,14,17,18],swoncat:[4,10,11,13,14,17],symbol:[2,3,4,8,18,20],symmetr:12,syntact:4,syntax:[4,22],sys:8,system:[4,8,9,17],tail:[4,7,17,22],take:[3,4,6,8,10,12,13,16,17,22],taken:10,talk:[4,17,22],target:[8,18],task:8,technic:2,techniqu:18,technolog:2,teh:17,temporari:18,ten:12,term:[1,2,4,7,10,11,14,20,22],termin:[2,3,7],ternari:4,test:[2,3],text:[0,1,3,4],text_to_express:[4,20],textual:4,than:[0,3,4,8,9,12,13,16],thei:[2,4,5,7,8,12,13,14,17,18,20,22],them:[2,3,4,5,7,8,12,13,14,17,18],theori:[2,3],therefor:[13,17],thi:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,18,20,21,22],thing:[2,4,7,8,10,13,14,17,18,20,22],think:[2,4,10,12,14,17],third:[3,4,6,7,13,17],thirti:12,those:[2,3,7,8,10,14,17],though:[12,13,17],thought:4,thousand:12,thread:2,three:[2,3,4,10,12,17],through:[1,4,12,18,22],thu:6,thun:[2,3],thunder:4,tied:17,tile:8,time:[3,4,8,10,11,12,14,17,18],tini:17,to_set:17,todai:4,todo:[19,20],togeth:[4,13],tok:4,token:[4,20],tommi:17,too:[14,17],took:8,tool:4,top:[2,3,4,22],total:[6,8,12],total_match:6,trace:[0,4,16,18],traceprint:21,track:18,tracker:0,trade:8,transform:14,translat:[8,14],travers:[18,19],treasur:0,treat:[0,2,3,19],treatment:13,tree:[0,4,19],treemap:14,tri:12,trick:[12,17],tricki:[8,10],trivial:[7,10,17],trobe:0,trove:0,truediv:[4,16],truthi:[3,4],ts0:[14,17],ts1:[14,17],tuck:[3,4,7,15,17],tupl:[3,4,22],turn:[2,3,8],twice:[8,14,17],two:[2,3,4,7,8,12,14,15,17,18,22],type:[4,14,19,20],typic:[2,3],unari:[4,10,14,15],unarybuiltinwrapp:3,unbalanc:[4,20],unclos:4,uncon:[3,4,6,7,13,14,17,18],under:[2,3,4,10],understand:[0,8,17],undocu:4,uniqu:[3,9,17],unit:[4,6,14,17],univers:[0,4],unless:[8,14],unlik:14,unnecessari:19,unpack:[2,3,4,22],unpair:12,unquot:[4,14,17],unstack:[3,4],untangl:[13,14],until:[7,8,10,13],unus:12,unusu:17,upward:10,usag:4,use:[0,2,3,4,5,8,10,12,13,16,17,18,22],used:[3,4,14,17,18,20,22],useful:[0,15],user:8,uses:[2,7,12,14],using:[3,7,8,13,14,17,18],usual:[0,2],util:[0,4,5,10,11,17],valid:9,valu:[2,3,4,5,7,8,12,14,15,19,22],value_n:17,vanilla:10,variabl:[14,19],variat:14,varient:17,varieti:4,variou:0,vener:[4,22],veri:[0,1,4,8,17,22],versa:[2,4],version:[0,1,2,13,18,19],via:4,vice:2,viewer:[1,4,21],vise:4,von:[0,2,3],wai:[0,2,3,4,6,8,10,12,14,15,17],walk:17,wall:8,want:[2,8,10,12,13,15,17],warranti:[3,4],wash:4,wast:4,websit:[0,12],welcom:4,well:[0,4,6,7,8,17,20],were:[4,8,10,14,18],what:[2,3,4,7,10,11,14,16,17,21],whatev:[2,3,4,13,17],when:[4,12,13,14,17,18,20,22],where:[2,3,4,6,7,10,14,17,22],whether:14,which:[0,1,3,4,7,8,10,12,14,17,18,22],whole:[2,3,7,12,17],whose:13,why:[8,15,17],wiki:[4,17],wikipedia:[0,4,17,18],wildli:4,wind:4,winner:8,wire:14,wit:10,within:[4,15,17],without:[2,17],won:17,word:[0,3,4,6,7,9,12,13,17,18],work:[0,4,6,7,8,10,12,13,14,17,18],worth:[8,12],would:[2,4,7,8,9,10,11,12,13,14,17,18,22],wouldn:10,wrap:[3,8],write:[4,6,8,10,13,14,17,18,19],written:[0,1,5,10,22],wrong:2,wtf:14,wtfmorphism:14,xor:4,year:4,yet:[4,10,14,17,18],yield:[2,3,4],you:[0,2,3,4,5,7,8,10,12,13,14,17,18],your:[2,3,4,6,7,8,9],yourself:[4,17],zero:[3,7,8,10,14,17,20,22],zip:[4,6,12],zip_:3,zstr:18},titles:["Thun 0.1.1 Documentation","Joy Interpreter","Functions Grouped by, er, Function with Examples","Function Reference","Joypy","Preamble","Advent of Code 2017","Advent of Code 2017","Advent of Code 2017","Advent of Code 2017","Advent of Code 2017","Advent of Code 2017","Developing a Program in Joy","Using <code class=\"docutils literal notranslate\"><span class=\"pre\">x</span></code> to Generate Values","Hylomorphism","Newton\u2019s method","Quadratic formula","Treating Trees","Preamble","Essays about Programming in Joy","Parsing Text into Joy Expressions","Tracing Joy Execution","Stack or Quote or Sequence or List\u2026"],titleterms:{"1st":6,"2nd":7,"3rd":8,"4th":9,"5th":10,"6th":11,"case":[15,17],"final":7,"function":[2,3,4,11,14,16,17],"long":5,"void":2,"while":2,Adding:17,One:13,The:[4,12,14,17],Use:17,Using:13,about:19,abov:14,add:[2,10,17],adding:17,address:18,advent:[6,7,8,9,10,11],aka:4,all:[8,10],ana:14,analysi:[8,12],anamorph:[2,14],app1:2,app2:2,app3:2,appendix:14,approxim:15,automat:17,averag:2,base:[15,17],befor:11,better:14,binari:2,block:7,branch:2,breakdown:10,btree:17,can:17,cata:14,catamorph:14,chatter:2,check:16,child:17,choic:2,clear:2,cleav:2,cmp:17,code:[6,7,8,9,10,11],codicil:16,combin:[2,14,17],compar:17,comparison:2,compil:[5,13],comput:15,con:[2,17],concat:2,continu:4,count:[10,11],crap:17,current:17,data:17,datastructur:17,decemb:[6,7,8,9,10,11],defin:[16,17],definit:16,delet:17,deriv:[14,16,17],determin:18,develop:12,dialect:0,dip:[2,18],dipd:2,dipdd:2,direco:13,disenstacken:2,div:2,document:0,doe:17,down:7,down_to_zero:2,drive:11,drop:2,dup:2,dupd:2,dupdip:2,els:17,empti:17,enstacken:2,epsilon:15,equal:17,error:15,essai:19,etc:4,euler:[12,13],eval:4,even:13,exampl:[2,15],execut:21,express:20,extract:[14,17],factor:[14,17],factori:14,fibonacci:13,filter:12,find:[8,14,15],first:[2,12],five:13,flatten:2,floordiv:2,form:[14,17],formula:16,four:14,from:14,ftw:6,fun:14,further:12,fusion:14,gcd:2,gener:[11,12,13,14,17],genrec:2,get:[10,17],getitem:2,given:[14,17],gotten:10,greater:17,group:2,help:2,host:0,how:[11,12,13],hylo:14,hylomorph:14,ift:2,increment:10,index:10,indic:0,inform:0,infra:[2,17,18],initi:15,integ:12,interlud:17,intern:20,interpret:[1,4],isn:17,item:18,iter:[12,17],joi:[0,1,3,4,8,12,14,18,19,20,21,22],joypi:4,just:[12,17],kei:17,languag:0,law:14,least_fract:2,left:17,less:17,let:12,librari:[3,4],like:17,list:[2,4,14,17,22],littl:12,logic:2,loop:[2,4,7],lshift:2,make:17,mani:[11,12],map:2,math:2,method:15,min:2,miscellan:[2,17],mod:2,modif:17,modulu:2,mul:2,multipl:[12,13],must:17,name:[16,17],nativ:16,neg:2,newton:15,node:[14,17],now:[10,17],nullari:2,number:[8,14,15],offset:8,order:17,osdn:0,our:17,out:7,over:2,pack:12,pam:2,paper:7,para:14,paramet:17,parameter:[14,17],paramorph:14,pars:[2,20],parser:[4,20],pass:4,path:18,pattern:14,per:17,piec:7,pop:2,popd:2,popop:2,pow:2,power:13,preambl:[5,10,14,18],pred:2,predic:[10,12,17],pretty_print:21,primrec:2,print:4,problem:[12,13],process:17,product:2,program:[11,12,14,16,17,19],project:[0,12,13],put:[8,17],python:4,quadrat:16,quick:0,quot:[2,4,22],rang:[2,12],range_to_zero:2,rank:8,read:4,recal:11,recur:[15,17],recurs:[14,17],redefin:17,refactor:[6,12,17],refer:3,rem:2,remaind:2,remov:2,render:12,repeat:11,repl:4,replac:5,rescu:8,reset:13,rest:[2,14],revers:2,right:[17,18],roll:2,rolldown:2,rollup:2,root:15,rshift:2,run:[2,13],sat:7,second:2,select:2,sequenc:[4,13,22],set:[10,17],shunt:2,simplest:12,simplifi:16,size:[2,5],slight:17,sqr:2,sqrt:2,squar:15,stack:[2,4,22],start:0,state:11,step:[2,10,14],straightforward:16,style:4,sub:2,succ:2,sum:[2,5,12],swaack:2,swap:2,swon:2,swoncat:2,symbol:14,sympi:8,tabl:0,tail:14,take:2,term:[12,13,17],ternari:2,text:20,than:[14,17],thi:17,think:7,third:2,three:13,thun:0,time:[2,13],todo:17,togeth:[8,10,17],toi:17,trace:[5,21],traceprint:4,travers:17,treat:17,tree:[14,17,18],treestep:[14,17],triangular:14,tricki:7,truediv:2,truthi:2,tuck:2,two:13,type:17,unari:2,uncon:2,unfinish:14,unit:2,unnecessari:12,unquot:2,unstack:2,use:14,usual:14,util:[21,22],valu:[10,13,17],variabl:16,version:[5,8,12,17],view:4,want:7,word:2,write:16,xor:2,zero:13,zip:2,zipper:18}})
\ No newline at end of file
index c940180..aa267ab 100644 (file)
@@ -87,6 +87,7 @@ There are also some Jupyter notebooks.
    pretty
    library
    lib
+   notebooks/index
 
 
 
@@ -1,8 +1,12 @@
+***************************
+Developing a Program in Joy
+***************************
+
+As an example of developing a program in Joy let's take the first problem from the Project Euler website.
 
 `Project Euler, first problem: "Multiples of 3 and 5" <https://projecteuler.net/problem=1>`__
 =============================================================================================
 
-::
 
     If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
 
@@ -12,6 +16,9 @@
 
     from notebook_preamble import J, V, define
 
+Sum a range filtered by a predicate
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 Let's create a predicate that returns ``True`` if a number is a multiple
 of 3 or 5 and ``False`` otherwise.
 
@@ -54,7 +61,10 @@ Logically this is fine, but pragmatically we are doing more work than we
 should be; we generate one thousand integers but actually use less than
 half of them. A better solution would be to generate just the multiples
 we want to sum, and to add them as we go rather than storing them and
-adding summing them at the end.
+and summing them at the end.
+
+Generate just the multiples
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 At first I had the idea to use two counters and increase them by three
 and five, respectively. This way we only generate the terms that we
@@ -206,6 +216,9 @@ the counter to the running sum. This function will do that:
 So one ``step`` through all seven terms brings the counter to 15 and the
 total to 60.
 
+How many multiples to sum?
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 .. code:: ipython2
 
     1000 / 15
@@ -276,6 +289,8 @@ get to 990 and then the first four numbers 3 2 1 3 to get to 999.
 
     233168
 
+Packing the terms into an integer
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 This form uses no extra storage and produces no unused summands. It's
 good but there's one more trick we can apply. The list of seven terms
@@ -517,7 +532,8 @@ And so we have at last:
     233168
 
 
-Let's refactor.
+Let's refactor
+^^^^^^^^^^^^^^^
 
 ::
 
index 7cc23e3..ead52b2 100644 (file)
@@ -2,6 +2,8 @@
 `Newton's method <https://en.wikipedia.org/wiki/Newton%27s_method>`__
 =====================================================================
 
+Newton-Raphson for finding the root of an equation.
+
 .. code:: ipython2
 
     from notebook_preamble import J, V, define
@@ -9,9 +11,12 @@
 Cf. `"Why Functional Programming Matters" by John
 Hughes <https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf>`__
 
-:math:`a_{i+1} = \frac{(a_i+\frac{n}{a_i})}{2}`
+Finding the Square-Root of a Number
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Let's define a function that computes the above equation:
+Let's define a function that computes this equation:
+
+:math:`a_{i+1} = \frac{(a_i+\frac{n}{a_i})}{2}`
 
 ::
 
@@ -35,6 +40,9 @@ We want it to leave n but replace a, so we execute it with ``unary``:
 
     define('Q == [tuck / + 2 /] unary')
 
+Compute the Error
+^^^^^^^^^^^^^^^^^
+
 And a function to compute the error:
 
 ::
@@ -53,6 +61,9 @@ below the error.
 
     define('err == [sqr - abs] nullary')
 
+``square-root``
+^^^^^^^^^^^^^^^
+
 Now we can define a recursive program that expects a number ``n``, an
 initial estimate ``a``, and an epsilon value ``ε``, and that leaves on
 the stack the square root of ``n`` to within the precision of the
@@ -75,14 +86,22 @@ next approximation and the error on the stack below the epsilon.
     n a'  err ε 
     n a' e    ε
 
-Let's define the recursive function from here. Start with ``ifte``; the
-predicate and the base case behavior are obvious:
+Let's define a recursive function ``K`` from here.
 
 ::
 
-    n a' e ε [<] [popop popd] [J] ifte
+    n a' e ε K
+
+    K == [P] [E] [R0] [R1] genrec
 
 Base-case
+~~~~~~~~~
+
+The predicate and the base case are obvious:
+
+::
+
+    K == [<] [popop popd] [R0] [R1] genrec
 
 ::
 
@@ -90,19 +109,25 @@ Base-case
     n a'           popd
       a'
 
+Recur
+~~~~~~~~~~
+
 The recursive branch is pretty easy. Discard the error and recur.
 
 ::
 
-    w/ K == [<] [popop popd] [J] ifte
+    K == [<] [popop popd] [R0]   [R1] genrec
+    K == [<] [popop popd] [R0 [K] R1] ifte
 
-    n a' e ε J
+::
+
+    n a' e ε               R0 [K] R1
     n a' e ε popd [Q err] dip [K] i
     n a'   ε      [Q err] dip [K] i
     n a' Q err ε              [K] i
     n a''  e   ε               K
 
-This fragment alone is pretty useful.
+This fragment alone is pretty useful.  (``R1`` is ``i`` so this is a ``primrec`` "primitive recursive" function.)
 
 .. code:: ipython2
 
@@ -127,6 +152,8 @@ This fragment alone is pretty useful.
 
     5.000000000000005
 
+Initial Approximation and Epsilon
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 So now all we need is a way to generate an initial approximation and an
 epsilon value:
@@ -139,6 +166,9 @@ epsilon value:
 
     define('square-root == dup 3 / 0.000001 dup K')
 
+Examples
+~~~~~~~~~~
+
 .. code:: ipython2
 
     J('36 square-root')
index 1c8b0d5..8223cc2 100644 (file)
@@ -1,6 +1,7 @@
 
+***********************************************************************
 `Quadratic formula <https://en.wikipedia.org/wiki/Quadratic_formula>`__
-=======================================================================
+***********************************************************************
 
 .. code:: ipython2
 
index 06bd719..6c81411 100644 (file)
@@ -1,6 +1,7 @@
 
+**************
 Treating Trees
-==============
+**************
 
 Although any expression in Joy can be considered to describe a
 `tree <https://en.wikipedia.org/wiki/Tree_structure>`__ with the quotes
@@ -20,8 +21,8 @@ That says that a BTree is either the empty quote ``[]`` or a quote with
 four items: a key, a value, and two BTrees representing the left and
 right branches of the tree.
 
-A Function to Traverse this Structure
--------------------------------------
+A Function to Traverse a BTree
+=====================================
 
 Let's take a crack at writing a function that can recursively iterate or
 traverse these trees.
@@ -102,9 +103,7 @@ Hmm, will ``step`` do?
     key left-keys right BTree-iter
     key left-keys right-keys
 
-Wow. So:
-
-::
+So::
 
     R1 == [rest rest] dip step
 
@@ -133,17 +132,13 @@ Parameterizing the ``F`` per-node processing function.
 
     [F] BTree-iter == [not] [pop] [[F] dupdip rest rest] [step] genrec
 
-Working backward:
-
-::
+Working backward::
 
     [not] [pop] [[F] dupdip rest rest]            [step] genrec
     [not] [pop] [F]       [dupdip rest rest] cons [step] genrec
     [F] [not] [pop] roll< [dupdip rest rest] cons [step] genrec
 
-Ergo:
-
-::
+Ergo::
 
     BTree-iter == [not] [pop] roll< [dupdip rest rest] cons [step] genrec
 
@@ -162,7 +157,7 @@ Ergo:
 
 .. parsed-literal::
 
-    
+    (nothing)
 
 
 .. code:: ipython2
@@ -646,6 +641,9 @@ Putting it all together:
     ['a' 23 [] ['b' 88 [] ['c' 44 [] []]]]
 
 
+A Set-Like Datastructure
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 We can use this to make a set-like datastructure by just setting values
 to e.g. 0 and ignoring them. It's set-like in that duplicate items added
 to it will only occur once within it, and we can query it in
@@ -693,8 +691,8 @@ from a list.
     [7 6 8 4 5 9 2 3]
 
 
-``cmp`` combinator
-==================
+Interlude: The ``cmp`` combinator
+=================================
 
 Instead of all this mucking about with nested ``ifte`` let's just go
 whole hog and define ``cmp`` which takes two values and three quoted
@@ -877,8 +875,8 @@ to understand:
     ['a' 23 [] ['b' 88 [] ['c' 44 [] []]]]
 
 
-Factoring and naming
-====================
+Interlude: Factoring and Naming
+================================
 
 It may seem silly, but a big part of programming in Forth (and therefore
 in Joy) is the idea of small, highly-factored definitions. If you choose
@@ -1210,9 +1208,6 @@ So:
 TODO: BTree-delete
 ==================
 
-Then, once we have add, get, and delete we can see about abstracting
-them.
-
 ::
 
        tree key [E] BTree-delete
@@ -1256,6 +1251,10 @@ And:
 Tree with node and list of trees.
 =================================
 
+Once we have add, get, and delete we can see about abstracting
+them.
+
+
 Let's consider a tree structure, similar to one described `"Why
 functional programming matters" by John
 Hughes <https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf>`__,
@@ -1268,7 +1267,7 @@ star <https://en.wikipedia.org/wiki/Kleene_star>`__.)
     tree = [] | [node [tree*]]
 
 ``treestep``
-~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^
 
 In the spirit of ``step`` we are going to define a combinator
 ``treestep`` which expects a tree and three additional items: a
@@ -1298,7 +1297,7 @@ combine the result with ``C``.
            node N [tree*] [K] map C
 
 Derive the recursive form.
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Since this is a recursive function, we can begin to derive it by finding
 the ``ifte`` stage that ``genrec`` will produce. The predicate and
@@ -1353,7 +1352,7 @@ Plug it in and convert to ``genrec``:
     K == [not] [pop z] [i [N] dip]   [map C] genrec
 
 Extract the givens to parameterize the program.
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 ::
 
@@ -1379,7 +1378,7 @@ Extract the givens to parameterize the program.
 The givens are all to the left so we have our definition.
 
 Define ``treestep``
-~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^
 
 ::
 
@@ -1439,7 +1438,7 @@ Define ``treestep``
 
 
 A slight modification.
-----------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Let's simplify the tree datastructure definition slightly by just
 letting the children be the ``rest`` of the tree:
@@ -1494,7 +1493,7 @@ The ``J`` function changes slightly.
 I think these trees seem a little easier to read.
 
 Redefining our BTree in terms of this form.
--------------------------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 ::
 
@@ -1560,7 +1559,10 @@ So:
     [3 2 9 5 4 8 6 7]
 
 
-There we go. #### In-order traversal with ``treestep``.
+There we go.
+
+In-order traversal with ``treestep``.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 From here:
 
@@ -1590,10 +1592,10 @@ So:
 
 
 Miscellaneous Crap
-------------------
+==================
 
 Toy with it.
-~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Let's reexamine:
 
@@ -1658,7 +1660,7 @@ items" in each node. This point to a more general factorization that
 would render a combinator that could work for other geometries of trees.
 
 A General Form for Trees
-------------------------
+========================
 
 A general form for tree data with N children per node:
 
@@ -1779,7 +1781,7 @@ Hmm...
 We could just let ``[R1]`` be a parameter too, for maximum flexibility.
 
 Automatically deriving the recursion combinator for a data type?
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+================================================================
 
 If I understand it correctly, the "Bananas..." paper talks about a way
 to build the processor function automatically from the description of
index e11fa52..b93191c 100644 (file)
@@ -1,11 +1,13 @@
 
-There are also some Jupyter notebooks.
-======================================
+Essays about Programming in Joy
+===============================
 
 .. toctree::
    :glob:
    :maxdepth: 2
 
-   *
-
+   Developing
+   Trees
+   Newton-Raphson
+   Quadratic