A little more bit o' docs.

This commit is contained in:
Simon Forman
2018-07-14 12:29:25 -07:00
parent 41b39e5977
commit 54491f0da2
20 changed files with 1702 additions and 131 deletions
@@ -366,10 +366,9 @@ numbers sixty-six times and then four more.</p>
</div>
<div class="section" id="project-euler-problem-two">
<h2>Project Euler Problem Two<a class="headerlink" href="#project-euler-problem-two" title="Permalink to this headline"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">By</span> <span class="n">considering</span> <span class="n">the</span> <span class="n">terms</span> <span class="ow">in</span> <span class="n">the</span> <span class="n">Fibonacci</span> <span class="n">sequence</span> <span class="n">whose</span> <span class="n">values</span> <span class="n">do</span> <span class="ow">not</span> <span class="n">exceed</span> <span class="n">four</span> <span class="n">million</span><span class="p">,</span>
<span class="n">find</span> <span class="n">the</span> <span class="nb">sum</span> <span class="n">of</span> <span class="n">the</span> <span class="n">even</span><span class="o">-</span><span class="n">valued</span> <span class="n">terms</span><span class="o">.</span>
</pre></div>
</div>
<blockquote>
<div>By considering the terms in the Fibonacci sequence whose values do
not exceed four million, find the sum of the even-valued terms.</div></blockquote>
<p>Now that we have a generator for the Fibonacci sequence, we need a
function that adds a term in the sequence to a sum if it is even, and
<code class="docutils literal notranslate"><span class="pre">pop</span></code>s it otherwise.</p>
@@ -17,7 +17,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Treating Trees II: treestep" href="Treestep.html" />
<link rel="prev" title="Recursive Combinators" href="Recursion_Combinators.html" />
<link rel="prev" title="Recursion Combinators" href="Recursion_Combinators.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@@ -1373,7 +1373,7 @@ Tree-delete == [pop not] [pop] [_Tree_delete_R0] [_Tree_delete_R1] genrec
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="index.html">Essays about Programming in Joy</a><ul>
<li>Previous: <a href="Recursion_Combinators.html" title="previous chapter">Recursive Combinators</a></li>
<li>Previous: <a href="Recursion_Combinators.html" title="previous chapter">Recursion Combinators</a></li>
<li>Next: <a href="Treestep.html" title="next chapter">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
</ul></li>
</ul></li>
@@ -6,7 +6,7 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Recursive Combinators &#8212; Thun 0.2.0 documentation</title>
<title>Recursion Combinators &#8212; Thun 0.2.0 documentation</title>
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../_static/documentation_options.js"></script>
@@ -35,8 +35,8 @@
<div class="code ipython2 highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">notebook_preamble</span> <span class="k">import</span> <span class="n">D</span><span class="p">,</span> <span class="n">DefinitionWrapper</span><span class="p">,</span> <span class="n">J</span><span class="p">,</span> <span class="n">V</span><span class="p">,</span> <span class="n">define</span>
</pre></div>
</div>
<div class="section" id="recursive-combinators">
<h1>Recursive Combinators<a class="headerlink" href="#recursive-combinators" title="Permalink to this headline"></a></h1>
<div class="section" id="recursion-combinators">
<h1>Recursion Combinators<a class="headerlink" href="#recursion-combinators" title="Permalink to this headline"></a></h1>
<p>This article describes the <code class="docutils literal notranslate"><span class="pre">genrec</span></code> combinator, how to use it, and
several generic specializations.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="p">[</span><span class="k">if</span><span class="p">]</span> <span class="p">[</span><span class="n">then</span><span class="p">]</span> <span class="p">[</span><span class="n">rec1</span><span class="p">]</span> <span class="p">[</span><span class="n">rec2</span><span class="p">]</span> <span class="n">genrec</span>
@@ -598,7 +598,7 @@ Wire”</a></p>
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Recursive Combinators</a><ul>
<li><a class="reference internal" href="#">Recursion Combinators</a><ul>
<li><a class="reference internal" href="#designing-recursive-functions">Designing Recursive Functions</a></li>
<li><a class="reference internal" href="#primitive-recursive-functions">Primitive Recursive Functions</a></li>
<li><a class="reference internal" href="#hylomorphism">Hylomorphism</a></li>
@@ -16,7 +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="Recursive Combinators" href="Recursion_Combinators.html" />
<link rel="next" title="Recursion Combinators" href="Recursion_Combinators.html" />
<link rel="prev" title="Quadratic formula" href="Quadratic.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@@ -185,7 +185,7 @@ and re-evaluate the expression.</p>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="index.html">Essays about Programming in Joy</a><ul>
<li>Previous: <a href="Quadratic.html" title="previous chapter">Quadratic formula</a></li>
<li>Next: <a href="Recursion_Combinators.html" title="next chapter">Recursive Combinators</a></li>
<li>Next: <a href="Recursion_Combinators.html" title="next chapter">Recursion Combinators</a></li>
</ul></li>
</ul></li>
</ul>
@@ -55,7 +55,7 @@
<li class="toctree-l2"><a class="reference internal" href="Replacing.html#a-shorter-trace">A shorter trace</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Recursion_Combinators.html">Recursive Combinators</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Recursion_Combinators.html">Recursion Combinators</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html#designing-recursive-functions">Designing Recursive Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html#primitive-recursive-functions">Primitive Recursive Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="Recursion_Combinators.html#hylomorphism">Hylomorphism</a></li>