---------- n >= 0
true
</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">0 <a href="#92a00d7d91da9f0f06c3f218c49c9b98323469962b291365b85d3c16b6b7f95f">>=</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>Return a Boolean value indicating if a number is greater than or equal to
-zero.</p></div></div><div class="backlinks"><h3>Used By</h3><a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a></div></div><hr><div><h2 id="c10987bd7cf853f6ea92ddac1b6c95fa830e3aee160cc5d4ba2fea3743be1aa2" class="func_name">!= <a href="#c10987bd7cf853f6ea92ddac1b6c95fa830e3aee160cc5d4ba2fea3743be1aa2" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#neq">neq</a>.</p></div></div><hr><div><h2 id="bbf3f11cb5b43e700273a78d12de55e4a7eab741ed2abf13787a4d2dc832b8ec" class="func_name">% <a href="#bbf3f11cb5b43e700273a78d12de55e4a7eab741ed2abf13787a4d2dc832b8ec" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#mod">mod</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#divmod" class="func_name">divmod</a> <a href="#mod" class="func_name">mod</a></div></div><hr><div><h2 id="684888c0ebb17f374298b65ee2807526c066094c701bcc7ebbe1c1095f494fc1" class="func_name">* <a href="#684888c0ebb17f374298b65ee2807526c066094c701bcc7ebbe1c1095f494fc1" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#mul">mul</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#lshift" class="func_name">lshift</a> <a href="#pow" class="func_name">pow</a> <a href="#product" class="func_name">product</a></div></div><hr><div><h2 id="a318c24216defe206feeb73ef5be00033fa9c4a74d0b967f6532a26ca5906d3b" class="func_name">+ <a href="#a318c24216defe206feeb73ef5be00033fa9c4a74d0b967f6532a26ca5906d3b" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#add">add</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#cfc0c0607a3380f7975346b30c14af8284f5493d9781b0ed847f499f01b4768e" class="func_name">++</a> <a href="#pm" class="func_name">pm</a> <a href="#sum" class="func_name">sum</a></div></div><hr><div><h2 id="cfc0c0607a3380f7975346b30c14af8284f5493d9781b0ed847f499f01b4768e" class="func_name">++ <a href="#cfc0c0607a3380f7975346b30c14af8284f5493d9781b0ed847f499f01b4768e" class="self_link">¶</a></h2><p></p><div class="notes"><p>See <a href="#succ">succ</a>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">1 <a href="#a318c24216defe206feeb73ef5be00033fa9c4a74d0b967f6532a26ca5906d3b">+</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#size" class="func_name">size</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a></div></div><hr><div><h2 id="3973e022e93220f9212c18d0d0c543ae7c309e46640da93a4a0314de999f5112" class="func_name">- <a href="#3973e022e93220f9212c18d0d0c543ae7c309e46640da93a4a0314de999f5112" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#sub">sub</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c" class="func_name">--</a> <a href="#neg" class="func_name">neg</a> <a href="#pm" class="func_name">pm</a></div></div><hr><div><h2 id="d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c" class="func_name">-- <a href="#d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c" class="self_link">¶</a></h2><p></p><div class="notes"><p>See <a href="#pred">pred</a>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">1 <a href="#3973e022e93220f9212c18d0d0c543ae7c309e46640da93a4a0314de999f5112">-</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#24eeb094bfbc05ab9fab7609e43f67a4b6f7f94db85bbab53d63ba083f006c9d" class="func_name">down_to_zero</a> <a href="#range" class="func_name">range</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a></div></div><hr><div><h2 id="8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1" class="func_name">/ <a href="#8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#div">div</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#average" class="func_name">average</a> <a href="#divmod" class="func_name">divmod</a> <a href="#rshift" class="func_name">rshift</a></div></div><hr><div><h2 id="c1773bc23efd62ebecd69d025d1561e8fc864159ba2fc48177060e4b376112b5" class="func_name">/\ <a href="#c1773bc23efd62ebecd69d025d1561e8fc864159ba2fc48177060e4b376112b5" class="self_link">¶</a></h2><p></p><div class="notes"><p>Binary Boolean <em>and</em>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#">_isnt_two_bools</a> [<a href="#pop">pop</a> false] [] <a href="#branch">branch</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#bool" class="func_name">bool</a> <a href="#not" class="func_name">not</a> <a href="#7a063e4cb04c8b9d833cec4caea5b184720eba13daf25139c99a355a266d921f" class="func_name">\/</a></div></div><hr><div><h2 id="dabd3aff769f07eb2965401eb029974ebba3407afd02b26ddb564ea5f8efae72" class="func_name">< <a href="#dabd3aff769f07eb2965401eb029974ebba3407afd02b26ddb564ea5f8efae72" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#lt">lt</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#abs" class="func_name">abs</a></div></div><hr><div><h2 id="4be261c018f23deac37f17f24abb5f42c4f32044fa3116d7b618446fb03ca09e" class="func_name"><< <a href="#4be261c018f23deac37f17f24abb5f42c4f32044fa3116d7b618446fb03ca09e" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#lshift">lshift</a>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#lshift">lshift</a></div></div></div><hr><div><h2 id="c6484f3156f82b92eadb0aeb7423d93ebd37f15dbbe3538f82d8da2acabaa108" class="func_name"><<{} <a href="#c6484f3156f82b92eadb0aeb7423d93ebd37f15dbbe3538f82d8da2acabaa108" class="self_link">¶</a></h2><p></p><div class="notes"><pre><code> ... b a <{}
+zero.</p></div></div><div class="backlinks"><h3>Used By</h3><a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a></div></div><hr><div><h2 id="c10987bd7cf853f6ea92ddac1b6c95fa830e3aee160cc5d4ba2fea3743be1aa2" class="func_name">!= <a href="#c10987bd7cf853f6ea92ddac1b6c95fa830e3aee160cc5d4ba2fea3743be1aa2" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#neq">neq</a>.</p></div></div><hr><div><h2 id="bbf3f11cb5b43e700273a78d12de55e4a7eab741ed2abf13787a4d2dc832b8ec" class="func_name">% <a href="#bbf3f11cb5b43e700273a78d12de55e4a7eab741ed2abf13787a4d2dc832b8ec" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#mod">mod</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#divmod" class="func_name">divmod</a> <a href="#mod" class="func_name">mod</a> <a href="#modulus" class="func_name">modulus</a></div></div><hr><div><h2 id="684888c0ebb17f374298b65ee2807526c066094c701bcc7ebbe1c1095f494fc1" class="func_name">* <a href="#684888c0ebb17f374298b65ee2807526c066094c701bcc7ebbe1c1095f494fc1" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#mul">mul</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#lshift" class="func_name">lshift</a> <a href="#pow" class="func_name">pow</a> <a href="#product" class="func_name">product</a></div></div><hr><div><h2 id="a318c24216defe206feeb73ef5be00033fa9c4a74d0b967f6532a26ca5906d3b" class="func_name">+ <a href="#a318c24216defe206feeb73ef5be00033fa9c4a74d0b967f6532a26ca5906d3b" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#add">add</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#cfc0c0607a3380f7975346b30c14af8284f5493d9781b0ed847f499f01b4768e" class="func_name">++</a> <a href="#pm" class="func_name">pm</a> <a href="#sum" class="func_name">sum</a></div></div><hr><div><h2 id="cfc0c0607a3380f7975346b30c14af8284f5493d9781b0ed847f499f01b4768e" class="func_name">++ <a href="#cfc0c0607a3380f7975346b30c14af8284f5493d9781b0ed847f499f01b4768e" class="self_link">¶</a></h2><p></p><div class="notes"><p>See <a href="#succ">succ</a>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">1 <a href="#a318c24216defe206feeb73ef5be00033fa9c4a74d0b967f6532a26ca5906d3b">+</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#size" class="func_name">size</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a></div></div><hr><div><h2 id="3973e022e93220f9212c18d0d0c543ae7c309e46640da93a4a0314de999f5112" class="func_name">- <a href="#3973e022e93220f9212c18d0d0c543ae7c309e46640da93a4a0314de999f5112" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#sub">sub</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c" class="func_name">--</a> <a href="#neg" class="func_name">neg</a> <a href="#pm" class="func_name">pm</a></div></div><hr><div><h2 id="d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c" class="func_name">-- <a href="#d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c" class="self_link">¶</a></h2><p></p><div class="notes"><p>See <a href="#pred">pred</a>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">1 <a href="#3973e022e93220f9212c18d0d0c543ae7c309e46640da93a4a0314de999f5112">-</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#24eeb094bfbc05ab9fab7609e43f67a4b6f7f94db85bbab53d63ba083f006c9d" class="func_name">down_to_zero</a> <a href="#pred" class="func_name">pred</a> <a href="#range" class="func_name">range</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a> <a href="#succ" class="func_name">succ</a></div></div><hr><div><h2 id="8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1" class="func_name">/ <a href="#8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#div">div</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#average" class="func_name">average</a> <a href="#divmod" class="func_name">divmod</a> <a href="#rshift" class="func_name">rshift</a></div></div><hr><div><h2 id="c1773bc23efd62ebecd69d025d1561e8fc864159ba2fc48177060e4b376112b5" class="func_name">/\ <a href="#c1773bc23efd62ebecd69d025d1561e8fc864159ba2fc48177060e4b376112b5" class="self_link">¶</a></h2><p></p><div class="notes"><p>Binary Boolean <em>and</em>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#">_isnt_two_bools</a> [<a href="#pop">pop</a> false] [] <a href="#branch">branch</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#bool" class="func_name">bool</a> <a href="#not" class="func_name">not</a> <a href="#7a063e4cb04c8b9d833cec4caea5b184720eba13daf25139c99a355a266d921f" class="func_name">\/</a></div></div><hr><div><h2 id="dabd3aff769f07eb2965401eb029974ebba3407afd02b26ddb564ea5f8efae72" class="func_name">< <a href="#dabd3aff769f07eb2965401eb029974ebba3407afd02b26ddb564ea5f8efae72" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#lt">lt</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#abs" class="func_name">abs</a></div></div><hr><div><h2 id="4be261c018f23deac37f17f24abb5f42c4f32044fa3116d7b618446fb03ca09e" class="func_name"><< <a href="#4be261c018f23deac37f17f24abb5f42c4f32044fa3116d7b618446fb03ca09e" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#lshift">lshift</a>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#lshift">lshift</a></div></div></div><hr><div><h2 id="c6484f3156f82b92eadb0aeb7423d93ebd37f15dbbe3538f82d8da2acabaa108" class="func_name"><<{} <a href="#c6484f3156f82b92eadb0aeb7423d93ebd37f15dbbe3538f82d8da2acabaa108" class="self_link">¶</a></h2><p></p><div class="notes"><pre><code> ... b a <{}
-----------------
... [] b a
</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[] <a href="#rollup">rollup</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>Tuck an empty list just under the first two items on the stack.</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#7562cc288bc56648a8695b314d63d7e8a92eba12768b38c102fd7067877423e7" class="func_name"><{}</a></div><div class="backlinks"><h3>Used By</h3><a href="#take" class="func_name">take</a></div></div><hr><div><h2 id="b60080dc8b8982d2a2bff6f8f3715c1939614dc553cd223ef21832b88c815866" class="func_name"><= <a href="#b60080dc8b8982d2a2bff6f8f3715c1939614dc553cd223ef21832b88c815866" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#le">le</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#range" class="func_name">range</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a></div></div><hr><div><h2 id="24295a9c545a402da4f2cc833dae7b4f3b80182f7f803516d580ca07c0642b64" class="func_name"><> <a href="#24295a9c545a402da4f2cc833dae7b4f3b80182f7f803516d580ca07c0642b64" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>See <a href="#neq">neq</a>.</p></div><div class="backlinks"><h3>Used By</h3><a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a></div></div><hr><div><h2 id="7562cc288bc56648a8695b314d63d7e8a92eba12768b38c102fd7067877423e7" class="func_name"><{} <a href="#7562cc288bc56648a8695b314d63d7e8a92eba12768b38c102fd7067877423e7" class="self_link">¶</a></h2><p></p><div class="notes"><pre><code> ... a <{}
T
</code></pre></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>This is one of the fundamental operations (although it can be defined in
terms of [choice] as above). The more common "if..then..else" construct
-[ifte] adds a predicate function that is evaluated [nullary].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#choice" class="func_name">choice</a> <a href="#ifte" class="func_name">ifte</a> <a href="#select" class="func_name">select</a></div><div class="backlinks"><h3>Used By</h3><a href="#c1773bc23efd62ebecd69d025d1561e8fc864159ba2fc48177060e4b376112b5" class="func_name">/\</a> <a href="#7a063e4cb04c8b9d833cec4caea5b184720eba13daf25139c99a355a266d921f" class="func_name">\/</a> <a href="#abs" class="func_name">abs</a> <a href="#and" class="func_name">and</a> <a href="#ifte" class="func_name">ifte</a> <a href="#not" class="func_name">not</a> <a href="#or" class="func_name">or</a> <a href="#small" class="func_name">small</a></div></div><hr><div><h2 id="ccccons" class="func_name">ccccons <a href="#ccccons" class="self_link">¶</a></h2><p></p><div class="notes"><pre><code> a b c d [...] ccccons
+[ifte] adds a predicate function that is evaluated [nullary].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#choice" class="func_name">choice</a> <a href="#ifte" class="func_name">ifte</a> <a href="#select" class="func_name">select</a></div><div class="backlinks"><h3>Used By</h3><a href="#c1773bc23efd62ebecd69d025d1561e8fc864159ba2fc48177060e4b376112b5" class="func_name">/\</a> <a href="#7a063e4cb04c8b9d833cec4caea5b184720eba13daf25139c99a355a266d921f" class="func_name">\/</a> <a href="#abs" class="func_name">abs</a> <a href="#and" class="func_name">and</a> <a href="#choice" class="func_name">choice</a> <a href="#ifte" class="func_name">ifte</a> <a href="#not" class="func_name">not</a> <a href="#or" class="func_name">or</a> <a href="#small" class="func_name">small</a></div></div><hr><div><h2 id="ccccons" class="func_name">ccccons <a href="#ccccons" class="self_link">¶</a></h2><p></p><div class="notes"><pre><code> a b c d [...] ccccons
---------------------------
[a b c d ...]
</code></pre>
a b true choice
---------------------
b
-</code></pre></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>It's a matter of taste whether you implement this in terms of [branch] or
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#pop">pop</a>] [<a href="#popd">popd</a>] <a href="#branch">branch</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>It's a matter of taste whether you implement this in terms of [branch] or
the other way around.</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#branch" class="func_name">branch</a> <a href="#select" class="func_name">select</a></div></div><hr><div><h2 id="clear" class="func_name">clear <a href="#clear" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>Clear everything from the stack.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[] <a href="#swaack">swaack</a> <a href="#pop">pop</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#stack" class="func_name">stack</a> <a href="#swaack" class="func_name">swaack</a></div><div class="backlinks"><h3>Used By</h3><a href="#enstacken" class="func_name">enstacken</a></div></div><hr><div><h2 id="cleave" class="func_name">cleave <a href="#cleave" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Run two programs in parallel, consuming one additional item, and put their
results on the stack.</p>
<pre><code> ... x [A] [B] cleave
------------------
[a ...]
</code></pre></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>Cons is a <a href="https://en.wikipedia.org/wiki/Cons#Lists">venerable old function from Lisp</a>.
-Its inverse operation is [uncons].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#uncons" class="func_name">uncons</a></div><div class="backlinks"><h3>Used By</h3><a href="#d5856351bbc14599e687dac105150e8a919b21477f3c00386405228caac1e43a" class="func_name">app2</a> <a href="#ccons" class="func_name">ccons</a> <a href="#codi" class="func_name">codi</a> <a href="#dipdd" class="func_name">dipdd</a> <a href="#dipddd" class="func_name">dipddd</a> <a href="#grabN" class="func_name">grabN</a> <a href="#map" class="func_name">map</a> <a href="#nulco" class="func_name">nulco</a> <a href="#pow" class="func_name">pow</a> <a href="#reco" class="func_name">reco</a> <a href="#swons" class="func_name">swons</a> <a href="#unit" class="func_name">unit</a></div></div><hr><div><h2 id="dinfrirst" class="func_name">dinfrirst <a href="#dinfrirst" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Specialist function (that means I forgot what it does and why.)</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#dip">dip</a> <a href="#infrst">infrst</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#nullary" class="func_name">nullary</a></div></div><hr><div><h2 id="dip" class="func_name">dip <a href="#dip" class="self_link">¶</a></h2><p><span class="kind">combinator</span> <span class="kind">built-in</span></p><div class="notes"><p>The <code>dip</code> combinator expects a quoted program on the stack and below it
+Its inverse operation is [uncons].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#uncons" class="func_name">uncons</a></div><div class="backlinks"><h3>Used By</h3><a href="#d5856351bbc14599e687dac105150e8a919b21477f3c00386405228caac1e43a" class="func_name">app2</a> <a href="#ccons" class="func_name">ccons</a> <a href="#codi" class="func_name">codi</a> <a href="#dipdd" class="func_name">dipdd</a> <a href="#dipddd" class="func_name">dipddd</a> <a href="#grabN" class="func_name">grabN</a> <a href="#map" class="func_name">map</a> <a href="#nulco" class="func_name">nulco</a> <a href="#pow" class="func_name">pow</a> <a href="#" class="func_name">quote-two</a> <a href="#reco" class="func_name">reco</a> <a href="#swons" class="func_name">swons</a> <a href="#unit" class="func_name">unit</a> <a href="#zip" class="func_name">zip</a></div></div><hr><div><h2 id="dinfrirst" class="func_name">dinfrirst <a href="#dinfrirst" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Specialist function (that means I forgot what it does and why.)</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#dip">dip</a> <a href="#infrst">infrst</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#nullary" class="func_name">nullary</a></div></div><hr><div><h2 id="dip" class="func_name">dip <a href="#dip" class="self_link">¶</a></h2><p><span class="kind">combinator</span> <span class="kind">built-in</span></p><div class="notes"><p>The <code>dip</code> combinator expects a quoted program on the stack and below it
some item, it hoists the item into the expression and runs the program
on the rest of the stack. </p>
<pre><code> ... x [Q] . dip
<pre><code> ... y x [Q] . dipd
-------------------------
... . Q y x
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#dip">dip</a>] <a href="#codi">codi</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>See [dip].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#dip" class="func_name">dip</a> <a href="#dipdd" class="func_name">dipdd</a> <a href="#dipddd" class="func_name">dipddd</a> <a href="#dupdip" class="func_name">dupdip</a> <a href="#dupdipd" class="func_name">dupdipd</a> <a href="#infra" class="func_name">infra</a></div><div class="backlinks"><h3>Used By</h3><a href="#cmp" class="func_name">cmp</a> <a href="#dipdd" class="func_name">dipdd</a> <a href="#dipddd" class="func_name">dipddd</a> <a href="#dupdd" class="func_name">dupdd</a> <a href="#dupdipd" class="func_name">dupdipd</a> <a href="#ifte" class="func_name">ifte</a> <a href="#popdd" class="func_name">popdd</a> <a href="#popopdd" class="func_name">popopdd</a></div></div><hr><div><h2 id="dipdd" class="func_name">dipdd <a href="#dipdd" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Like [dip] but expects three items. :</p>
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#dip">dip</a>] <a href="#codi">codi</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>See [dip].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#dip" class="func_name">dip</a> <a href="#dipdd" class="func_name">dipdd</a> <a href="#dipddd" class="func_name">dipddd</a> <a href="#dupdip" class="func_name">dupdip</a> <a href="#dupdipd" class="func_name">dupdipd</a> <a href="#infra" class="func_name">infra</a></div><div class="backlinks"><h3>Used By</h3><a href="#cmp" class="func_name">cmp</a> <a href="#dipdd" class="func_name">dipdd</a> <a href="#dipddd" class="func_name">dipddd</a> <a href="#dupdd" class="func_name">dupdd</a> <a href="#dupdipd" class="func_name">dupdipd</a> <a href="#ifte" class="func_name">ifte</a> <a href="#popdd" class="func_name">popdd</a> <a href="#popopdd" class="func_name">popopdd</a> <a href="#" class="func_name">uncons-pair</a></div></div><hr><div><h2 id="dipdd" class="func_name">dipdd <a href="#dipdd" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Like [dip] but expects three items. :</p>
<pre><code> ... z y x [Q] . dipdd
-----------------------------
... . Q z y x
<pre><code> [a ...]
--------------
a
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#uncons">uncons</a> <a href="#pop">pop</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#second" class="func_name">second</a> <a href="#third" class="func_name">third</a> <a href="#fourth" class="func_name">fourth</a> <a href="#rest" class="func_name">rest</a></div><div class="backlinks"><h3>Used By</h3><a href="#at" class="func_name">at</a> <a href="#07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="func_name">first_two</a> <a href="#infrst" class="func_name">infrst</a> <a href="#second" class="func_name">second</a> <a href="#uncons" class="func_name">uncons</a></div></div><hr><div><h2 id="07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="func_name">first_two <a href="#07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="self_link">¶</a></h2><p></p><div class="notes"><p>Replace a list with its first two items.</p>
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#uncons">uncons</a> <a href="#pop">pop</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#second" class="func_name">second</a> <a href="#third" class="func_name">third</a> <a href="#fourth" class="func_name">fourth</a> <a href="#rest" class="func_name">rest</a></div><div class="backlinks"><h3>Used By</h3><a href="#at" class="func_name">at</a> <a href="#07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="func_name">first_two</a> <a href="#getitem" class="func_name">getitem</a> <a href="#infrst" class="func_name">infrst</a> <a href="#second" class="func_name">second</a> <a href="#uncons" class="func_name">uncons</a></div></div><hr><div><h2 id="07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="func_name">first_two <a href="#07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="self_link">¶</a></h2><p></p><div class="notes"><p>Replace a list with its first two items.</p>
<pre><code> [a b ...] first_two
-------------------------
a b
P == [I] [T] [R] tailrec
== [I] [T] [R [P] i] ifte
== [I] [T] [R P] ifte</p>
-</blockquote></div></div><div class="crosslinks"><h3>See Also</h3><a href="#anamorphism" class="func_name">anamorphism</a> <a href="#tailrec" class="func_name">tailrec</a> <a href="#x" class="func_name">x</a></div><div class="backlinks"><h3>Used By</h3><a href="#anamorphism" class="func_name">anamorphism</a> <a href="#genrec" class="func_name">genrec</a> <a href="#tailrec" class="func_name">tailrec</a></div></div><hr><div><h2 id="getitem" class="func_name">getitem <a href="#getitem" class="self_link">¶</a></h2><p></p><div class="notes"><p>Expects an integer and a quote on the stack and returns the item at the
+</blockquote></div></div><div class="crosslinks"><h3>See Also</h3><a href="#anamorphism" class="func_name">anamorphism</a> <a href="#tailrec" class="func_name">tailrec</a> <a href="#x" class="func_name">x</a></div><div class="backlinks"><h3>Used By</h3><a href="#anamorphism" class="func_name">anamorphism</a> <a href="#genrec" class="func_name">genrec</a> <a href="#tailrec" class="func_name">tailrec</a> <a href="#zip" class="func_name">zip</a></div></div><hr><div><h2 id="getitem" class="func_name">getitem <a href="#getitem" class="self_link">¶</a></h2><p></p><div class="notes"><p>Expects an integer and a quote on the stack and returns the item at the
nth position in the quote counting from 0.</p>
<h3>Example</h3>
<pre><code> [a b c d] 2 getitem
-------------------------
c
-</code></pre></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>If the number isn't a valid index into the quote <code>getitem</code> will cause
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#rest">rest</a>] <a href="#times">times</a> <a href="#first">first</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>If the number isn't a valid index into the quote <code>getitem</code> will cause
some sort of problem (the exact nature of which is
-implementation-dependant.)</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#concat" class="func_name">concat</a> <a href="#first" class="func_name">first</a> <a href="#07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="func_name">first_two</a> <a href="#flatten" class="func_name">flatten</a> <a href="#fourth" class="func_name">fourth</a> <a href="#remove" class="func_name">remove</a> <a href="#rest" class="func_name">rest</a> <a href="#reverse" class="func_name">reverse</a> <a href="#rrest" class="func_name">rrest</a> <a href="#second" class="func_name">second</a> <a href="#shift" class="func_name">shift</a> <a href="#shunt" class="func_name">shunt</a> <a href="#size" class="func_name">size</a> <a href="#sort" class="func_name">sort</a> <a href="#11410ec2e9e5af6b7643845e3382d79fd07d4518548586894c0201f69e98447c" class="func_name">split_at</a> <a href="#ba4c8ebb56beba87283248c7ef9ea77b0cf1d215cd283aa0c9fa0a3e971e8415" class="func_name">split_list</a> <a href="#swaack" class="func_name">swaack</a> <a href="#third" class="func_name">third</a> <a href="#zip" class="func_name">zip</a></div></div><hr><div><h2 id="grabN" class="func_name">grabN <a href="#grabN" class="self_link">¶</a></h2><p></p><div class="notes"><p>Expect a number on the top of the stack and [cons] that many items from under it onto a new list.</p>
+implementation-dependant.)</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#concat" class="func_name">concat</a> <a href="#first" class="func_name">first</a> <a href="#07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="func_name">first_two</a> <a href="#flatten" class="func_name">flatten</a> <a href="#fourth" class="func_name">fourth</a> <a href="#remove" class="func_name">remove</a> <a href="#rest" class="func_name">rest</a> <a href="#reverse" class="func_name">reverse</a> <a href="#rrest" class="func_name">rrest</a> <a href="#second" class="func_name">second</a> <a href="#shift" class="func_name">shift</a> <a href="#shunt" class="func_name">shunt</a> <a href="#size" class="func_name">size</a> <a href="#sort" class="func_name">sort</a> <a href="#11410ec2e9e5af6b7643845e3382d79fd07d4518548586894c0201f69e98447c" class="func_name">split_at</a> <a href="#ba4c8ebb56beba87283248c7ef9ea77b0cf1d215cd283aa0c9fa0a3e971e8415" class="func_name">split_list</a> <a href="#swaack" class="func_name">swaack</a> <a href="#third" class="func_name">third</a> <a href="#zip" class="func_name">zip</a></div><div class="backlinks"><h3>Used By</h3><a href="#pick" class="func_name">pick</a></div></div><hr><div><h2 id="grabN" class="func_name">grabN <a href="#grabN" class="self_link">¶</a></h2><p></p><div class="notes"><p>Expect a number on the top of the stack and [cons] that many items from under it onto a new list.</p>
<h3>Example</h3>
<pre><code> a b c d e 3 grabN
-----------------------
-------------
. Q
</code></pre></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>This is a fundamental combinator. It is used in all kinds of places. For
-example, the [x] combinator can be defined as <code>dup i</code>.</p></div></div><div class="backlinks"><h3>Used By</h3><a href="#b" class="func_name">b</a> <a href="#fork" class="func_name">fork</a> <a href="#ii" class="func_name">ii</a> <a href="#infra" class="func_name">infra</a> <a href="#pam" class="func_name">pam</a> <a href="#tailrec" class="func_name">tailrec</a> <a href="#unquoted" class="func_name">unquoted</a> <a href="#x" class="func_name">x</a></div></div><hr><div><h2 id="id" class="func_name">id <a href="#id" class="self_link">¶</a></h2><p></p><div class="notes"><p>The identity function.</p></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>Does nothing. It's kind of a mathematical thing, but it occasionally comes in handy.</p></div></div></div><hr><div><h2 id="ifte" class="func_name">ifte <a href="#ifte" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>If-Then-Else combinator, a common and convenient specialization of [branch].</p>
+example, the [x] combinator can be defined as <code>dup i</code>.</p></div></div><div class="backlinks"><h3>Used By</h3><a href="#b" class="func_name">b</a> <a href="#fork" class="func_name">fork</a> <a href="#ii" class="func_name">ii</a> <a href="#infra" class="func_name">infra</a> <a href="#pam" class="func_name">pam</a> <a href="#tailrec" class="func_name">tailrec</a> <a href="#unquoted" class="func_name">unquoted</a> <a href="#x" class="func_name">x</a> <a href="#zip" class="func_name">zip</a></div></div><hr><div><h2 id="id" class="func_name">id <a href="#id" class="self_link">¶</a></h2><p></p><div class="notes"><p>The identity function.</p></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>Does nothing. It's kind of a mathematical thing, but it occasionally comes in handy.</p></div></div></div><hr><div><h2 id="ifte" class="func_name">ifte <a href="#ifte" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>If-Then-Else combinator, a common and convenient specialization of [branch].</p>
<pre><code> [if] [then] [else] ifte
---------------------------------------
[if] nullary [else] [then] branch
1 9
1 2 3 4 [+] app2
----------------------
- 1 2 5 6</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#d5856351bbc14599e687dac105150e8a919b21477f3c00386405228caac1e43a" class="func_name">app2</a> <a href="#b" class="func_name">b</a></div><div class="backlinks"><h3>Used By</h3><a href="#d5856351bbc14599e687dac105150e8a919b21477f3c00386405228caac1e43a" class="func_name">app2</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a></div></div><hr><div><h2 id="infra" class="func_name">infra <a href="#infra" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Accept a quoted program and a list on the stack and run the program with
+ 1 2 5 6</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#d5856351bbc14599e687dac105150e8a919b21477f3c00386405228caac1e43a" class="func_name">app2</a> <a href="#b" class="func_name">b</a></div><div class="backlinks"><h3>Used By</h3><a href="#d5856351bbc14599e687dac105150e8a919b21477f3c00386405228caac1e43a" class="func_name">app2</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a> <a href="#" class="func_name">uncons-two</a></div></div><hr><div><h2 id="infra" class="func_name">infra <a href="#infra" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Accept a quoted program and a list on the stack and run the program with
the list as its stack. Does not affect the stack (below the list.)</p>
<pre><code> ... x y z [a b c] [Q] infra
---------------------------------
<pre><code> a b mod
-------------
(a%b)
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#bbf3f11cb5b43e700273a78d12de55e4a7eab741ed2abf13787a4d2dc832b8ec">%</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#divmod" class="func_name">divmod</a> <a href="#mul" class="func_name">mul</a></div><div class="backlinks"><h3>Used By</h3><a href="#gcd" class="func_name">gcd</a></div></div><hr><div><h2 id="modulus" class="func_name">modulus <a href="#modulus" class="self_link">¶</a></h2><p></p><div class="notes"><p>See <a href="#mod">mod</a>.</p></div></div><hr><div><h2 id="mul" class="func_name">mul <a href="#mul" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>Multiply two numbers.</p>
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#bbf3f11cb5b43e700273a78d12de55e4a7eab741ed2abf13787a4d2dc832b8ec">%</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#divmod" class="func_name">divmod</a> <a href="#mul" class="func_name">mul</a></div><div class="backlinks"><h3>Used By</h3><a href="#gcd" class="func_name">gcd</a></div></div><hr><div><h2 id="modulus" class="func_name">modulus <a href="#modulus" class="self_link">¶</a></h2><p></p><div class="notes"><p>See <a href="#mod">mod</a>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#bbf3f11cb5b43e700273a78d12de55e4a7eab741ed2abf13787a4d2dc832b8ec">%</a></div></div></div><hr><div><h2 id="mul" class="func_name">mul <a href="#mul" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>Multiply two numbers.</p>
<pre><code> a b mul
-------------
(a×b)
[[F] nullary]
</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#nullary">nullary</a>] <a href="#cons">cons</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>Helper function for [or] and [and].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#and" class="func_name">and</a> <a href="#or" class="func_name">or</a></div><div class="backlinks"><h3>Used By</h3><a href="#and" class="func_name">and</a> <a href="#or" class="func_name">or</a> <a href="#while" class="func_name">while</a></div></div><hr><div><h2 id="null" class="func_name">null <a href="#null" class="self_link">¶</a></h2><p></p><div class="notes"><p>True if the item on the top of the stack is an empty list,
false if it's a list but not empty,
-and an error if it's not a list.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#">_isnt_list</a> <a href="#bool">bool</a> <a href="#not">not</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#small" class="func_name">small</a></div></div><hr><div><h2 id="nullary" class="func_name">nullary <a href="#nullary" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Run a quoted program without using any stack values and leave the first
+and an error if it's not a list.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#">_isnt_list</a> <a href="#bool">bool</a> <a href="#not">not</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#small" class="func_name">small</a> <a href="#zip" class="func_name">zip</a></div></div><hr><div><h2 id="nullary" class="func_name">nullary <a href="#nullary" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Run a quoted program without using any stack values and leave the first
item of the result on the stack.</p>
<pre><code> ... [P] nullary
---------------------
-------------------------------
5 7 [12 -2 35 0 5]
</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#i">i</a>] <a href="#map">map</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>A specialization of [map] that runs a list of functions in parallel (if
-the underlying [map] function is so implemented, of course.)</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#map" class="func_name">map</a></div></div><hr><div><h2 id="pick" class="func_name">pick <a href="#pick" class="self_link">¶</a></h2><p></p><div class="notes"><p>See <a href="#getitem">getitem</a>.</p></div></div><hr><div><h2 id="pm" class="func_name">pm <a href="#pm" class="self_link">¶</a></h2><p></p><div class="notes"><p>Plus or minus. Replace two numbers with their sum and difference.</p>
+the underlying [map] function is so implemented, of course.)</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#map" class="func_name">map</a></div></div><hr><div><h2 id="pick" class="func_name">pick <a href="#pick" class="self_link">¶</a></h2><p></p><div class="notes"><p>See <a href="#getitem">getitem</a>.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#getitem">getitem</a></div></div></div><hr><div><h2 id="pm" class="func_name">pm <a href="#pm" class="self_link">¶</a></h2><p></p><div class="notes"><p>Plus or minus. Replace two numbers with their sum and difference.</p>
<pre><code> a b pm
-----------------
(a+b) (a-b)
</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#a318c24216defe206feeb73ef5be00033fa9c4a74d0b967f6532a26ca5906d3b">+</a>] [<a href="#3973e022e93220f9212c18d0d0c543ae7c309e46640da93a4a0314de999f5112">-</a>] <a href="#clop">clop</a></div></div></div><hr><div><h2 id="pop" class="func_name">pop <a href="#pop" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><p>Pop the top item from the stack and discard it.</p>
<pre><code> a pop
-----------
-</code></pre></div><div class="crosslinks"><h3>See Also</h3><a href="#popd" class="func_name">popd</a> <a href="#popdd" class="func_name">popdd</a> <a href="#popop" class="func_name">popop</a> <a href="#popopd" class="func_name">popopd</a> <a href="#popopdd" class="func_name">popopdd</a> <a href="#popopop" class="func_name">popopop</a></div><div class="backlinks"><h3>Used By</h3><a href="#c1773bc23efd62ebecd69d025d1561e8fc864159ba2fc48177060e4b376112b5" class="func_name">/\</a> <a href="#7a063e4cb04c8b9d833cec4caea5b184720eba13daf25139c99a355a266d921f" class="func_name">\/</a> <a href="#anamorphism" class="func_name">anamorphism</a> <a href="#clear" class="func_name">clear</a> <a href="#disenstacken" class="func_name">disenstacken</a> <a href="#first" class="func_name">first</a> <a href="#gcd" class="func_name">gcd</a> <a href="#popd" class="func_name">popd</a> <a href="#popdd" class="func_name">popdd</a> <a href="#popop" class="func_name">popop</a> <a href="#popopop" class="func_name">popopop</a> <a href="#size" class="func_name">size</a> <a href="#small" class="func_name">small</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a> <a href="#take" class="func_name">take</a> <a href="#unstack" class="func_name">unstack</a></div></div><hr><div><h2 id="popd" class="func_name">popd <a href="#popd" class="self_link">¶</a></h2><p></p><div class="notes"><p>[pop] the second item down on the stack.</p>
+</code></pre></div><div class="crosslinks"><h3>See Also</h3><a href="#popd" class="func_name">popd</a> <a href="#popdd" class="func_name">popdd</a> <a href="#popop" class="func_name">popop</a> <a href="#popopd" class="func_name">popopd</a> <a href="#popopdd" class="func_name">popopdd</a> <a href="#popopop" class="func_name">popopop</a></div><div class="backlinks"><h3>Used By</h3><a href="#c1773bc23efd62ebecd69d025d1561e8fc864159ba2fc48177060e4b376112b5" class="func_name">/\</a> <a href="#7a063e4cb04c8b9d833cec4caea5b184720eba13daf25139c99a355a266d921f" class="func_name">\/</a> <a href="#anamorphism" class="func_name">anamorphism</a> <a href="#choice" class="func_name">choice</a> <a href="#clear" class="func_name">clear</a> <a href="#disenstacken" class="func_name">disenstacken</a> <a href="#first" class="func_name">first</a> <a href="#gcd" class="func_name">gcd</a> <a href="#popd" class="func_name">popd</a> <a href="#popdd" class="func_name">popdd</a> <a href="#popop" class="func_name">popop</a> <a href="#popopop" class="func_name">popopop</a> <a href="#size" class="func_name">size</a> <a href="#small" class="func_name">small</a> <a href="#b75cae41e7f9ba4ab72cc1c5ec83aa5313ea180fae61bc25370ce4e4b540c3c7" class="func_name">spiral_next</a> <a href="#take" class="func_name">take</a> <a href="#unstack" class="func_name">unstack</a> <a href="#zip" class="func_name">zip</a></div></div><hr><div><h2 id="popd" class="func_name">popd <a href="#popd" class="self_link">¶</a></h2><p></p><div class="notes"><p>[pop] the second item down on the stack.</p>
<pre><code> a b popd
--------------
b
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#pop">pop</a>] <a href="#dip">dip</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#pop" class="func_name">pop</a> <a href="#popdd" class="func_name">popdd</a> <a href="#popop" class="func_name">popop</a> <a href="#popopd" class="func_name">popopd</a> <a href="#popopdd" class="func_name">popopdd</a> <a href="#popopop" class="func_name">popopop</a></div><div class="backlinks"><h3>Used By</h3><a href="#binary" class="func_name">binary</a> <a href="#grba" class="func_name">grba</a> <a href="#rest" class="func_name">rest</a> <a href="#ternary" class="func_name">ternary</a> <a href="#unary" class="func_name">unary</a></div></div><hr><div><h2 id="popdd" class="func_name">popdd <a href="#popdd" class="self_link">¶</a></h2><p></p><div class="notes"><p>[pop] the third item on the stack.</p>
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#pop">pop</a>] <a href="#dip">dip</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#pop" class="func_name">pop</a> <a href="#popdd" class="func_name">popdd</a> <a href="#popop" class="func_name">popop</a> <a href="#popopd" class="func_name">popopd</a> <a href="#popopdd" class="func_name">popopdd</a> <a href="#popopop" class="func_name">popopop</a></div><div class="backlinks"><h3>Used By</h3><a href="#binary" class="func_name">binary</a> <a href="#choice" class="func_name">choice</a> <a href="#grba" class="func_name">grba</a> <a href="#rest" class="func_name">rest</a> <a href="#ternary" class="func_name">ternary</a> <a href="#unary" class="func_name">unary</a></div></div><hr><div><h2 id="popdd" class="func_name">popdd <a href="#popdd" class="self_link">¶</a></h2><p></p><div class="notes"><p>[pop] the third item on the stack.</p>
<pre><code> a b c popdd
-----------------
b c
<pre><code> 2 [2 3 4 5 6 7 8 9] [pow] map
-----------------------------------
2 [4 8 16 32 64 128 256 512]
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">1 <a href="#93e14595116819706f1c5b8b64589abc8f3c47cfa09082a3fcb9156b5318d44a">roll></a> <a href="#swap">swap</a> [<a href="#684888c0ebb17f374298b65ee2807526c066094c701bcc7ebbe1c1095f494fc1">*</a>] <a href="#cons">cons</a> <a href="#times">times</a></div></div></div><hr><div><h2 id="pred" class="func_name">pred <a href="#pred" class="self_link">¶</a></h2><p></p><div class="notes"><p>Predecessor. Decrement TOS.</p></div><div class="crosslinks"><h3>See Also</h3><a href="#succ" class="func_name">succ</a></div></div><hr><div><h2 id="primrec" class="func_name">primrec <a href="#primrec" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>From the <a href="https://www.kevinalbrecht.com/code/joy-mirror/j00ovr.html">"Overview of the language JOY"</a></p>
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">1 <a href="#93e14595116819706f1c5b8b64589abc8f3c47cfa09082a3fcb9156b5318d44a">roll></a> <a href="#swap">swap</a> [<a href="#684888c0ebb17f374298b65ee2807526c066094c701bcc7ebbe1c1095f494fc1">*</a>] <a href="#cons">cons</a> <a href="#times">times</a></div></div></div><hr><div><h2 id="pred" class="func_name">pred <a href="#pred" class="self_link">¶</a></h2><p></p><div class="notes"><p>Predecessor. Decrement TOS.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c">--</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#succ" class="func_name">succ</a></div></div><hr><div><h2 id="primrec" class="func_name">primrec <a href="#primrec" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>From the <a href="https://www.kevinalbrecht.com/code/joy-mirror/j00ovr.html">"Overview of the language JOY"</a></p>
<blockquote>
<p>The primrec combinator expects two quoted programs in addition to a
data parameter. For an integer data parameter it works like this: If
<p>See the <a href="https://osdn.net/projects/joypy/scm/git/Thun/blobs/master/docs/notebooks/Remove-Function.ipynb">"Remove Function" notebook</a>.</p></div></div><hr><div><h2 id="rest" class="func_name">rest <a href="#rest" class="self_link">¶</a></h2><p><span class="kind">built-in</span></p><div class="notes"><pre><code> [a ...] rest
------------------
[...]
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#uncons">uncons</a> <a href="#popd">popd</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#first" class="func_name">first</a> <a href="#uncons" class="func_name">uncons</a></div><div class="backlinks"><h3>Used By</h3><a href="#drop" class="func_name">drop</a> <a href="#fourth" class="func_name">fourth</a> <a href="#reco" class="func_name">reco</a> <a href="#rrest" class="func_name">rrest</a> <a href="#second" class="func_name">second</a> <a href="#small" class="func_name">small</a> <a href="#third" class="func_name">third</a> <a href="#uncons" class="func_name">uncons</a></div></div><hr><div><h2 id="reverse" class="func_name">reverse <a href="#reverse" class="self_link">¶</a></h2><p></p><div class="notes"><p>Reverse the list on the top of the stack.</p>
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#uncons">uncons</a> <a href="#popd">popd</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#first" class="func_name">first</a> <a href="#uncons" class="func_name">uncons</a></div><div class="backlinks"><h3>Used By</h3><a href="#drop" class="func_name">drop</a> <a href="#fourth" class="func_name">fourth</a> <a href="#getitem" class="func_name">getitem</a> <a href="#reco" class="func_name">reco</a> <a href="#rrest" class="func_name">rrest</a> <a href="#second" class="func_name">second</a> <a href="#small" class="func_name">small</a> <a href="#third" class="func_name">third</a> <a href="#uncons" class="func_name">uncons</a></div></div><hr><div><h2 id="reverse" class="func_name">reverse <a href="#reverse" class="self_link">¶</a></h2><p></p><div class="notes"><p>Reverse the list on the top of the stack.</p>
<h3>Example</h3>
<pre><code> [1 2 3] reverse
---------------------
<pre><code> a b sub
-------------
(a-b)
-</code></pre></div><div class="crosslinks"><h3>See Also</h3><a href="#add" class="func_name">add</a></div></div><hr><div><h2 id="succ" class="func_name">succ <a href="#succ" class="self_link">¶</a></h2><p></p><div class="notes"><p>Successor. Increment TOS.</p></div><div class="crosslinks"><h3>See Also</h3><a href="#pred" class="func_name">pred</a></div></div><hr><div><h2 id="sum" class="func_name">sum <a href="#sum" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Given a quoted sequence of numbers return the sum.</p>
+</code></pre></div><div class="crosslinks"><h3>See Also</h3><a href="#add" class="func_name">add</a></div></div><hr><div><h2 id="succ" class="func_name">succ <a href="#succ" class="self_link">¶</a></h2><p></p><div class="notes"><p>Successor. Increment TOS.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c">--</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#pred" class="func_name">pred</a></div></div><hr><div><h2 id="sum" class="func_name">sum <a href="#sum" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Given a quoted sequence of numbers return the sum.</p>
<h3>Example</h3>
<pre><code> [1 2 3 4 5] sum
---------------------
<pre><code> a b c swapd
-----------------
b a c
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#swap">swap</a>] <a href="#dip">dip</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#over" class="func_name">over</a> <a href="#tuck" class="func_name">tuck</a></div><div class="backlinks"><h3>Used By</h3><a href="#2a40b97c2fcb8f8cea992e519101735a642ca89734b9b57ecca5e4586327a4bd" class="func_name">roll<</a> <a href="#93e14595116819706f1c5b8b64589abc8f3c47cfa09082a3fcb9156b5318d44a" class="func_name">roll></a> <a href="#tuck" class="func_name">tuck</a></div></div><hr><div><h2 id="swoncat" class="func_name">swoncat <a href="#swoncat" class="self_link">¶</a></h2><p></p><div class="notes"><p>[concat] two lists, but [swap] the lists first.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#swap">swap</a> <a href="#concat">concat</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#concat" class="func_name">concat</a></div><div class="backlinks"><h3>Used By</h3><a href="#unstack" class="func_name">unstack</a></div></div><hr><div><h2 id="swons" class="func_name">swons <a href="#swons" class="self_link">¶</a></h2><p></p><div class="notes"><p>Like [cons] but [swap] the item and list.</p>
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#swap">swap</a>] <a href="#dip">dip</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#over" class="func_name">over</a> <a href="#tuck" class="func_name">tuck</a></div><div class="backlinks"><h3>Used By</h3><a href="#2a40b97c2fcb8f8cea992e519101735a642ca89734b9b57ecca5e4586327a4bd" class="func_name">roll<</a> <a href="#93e14595116819706f1c5b8b64589abc8f3c47cfa09082a3fcb9156b5318d44a" class="func_name">roll></a> <a href="#tuck" class="func_name">tuck</a> <a href="#" class="func_name">uncons-two</a></div></div><hr><div><h2 id="swoncat" class="func_name">swoncat <a href="#swoncat" class="self_link">¶</a></h2><p></p><div class="notes"><p>[concat] two lists, but [swap] the lists first.</p></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition"><a href="#swap">swap</a> <a href="#concat">concat</a></div></div><div class="crosslinks"><h3>See Also</h3><a href="#concat" class="func_name">concat</a></div><div class="backlinks"><h3>Used By</h3><a href="#unstack" class="func_name">unstack</a></div></div><hr><div><h2 id="swons" class="func_name">swons <a href="#swons" class="self_link">¶</a></h2><p></p><div class="notes"><p>Like [cons] but [swap] the item and list.</p>
<pre><code> [...] a swons
-------------------
[a ...]
This is a common pattern in Joy. You accept some parameters from the
stack which typically include qouted programs and use them to build
another program which does the actual work. This is kind of like macros
-in Lisp, or preprocessor directives in C.</div><div class="backlinks"><h3>Used By</h3><a href="#drop" class="func_name">drop</a> <a href="#grabN" class="func_name">grabN</a> <a href="#lshift" class="func_name">lshift</a> <a href="#pow" class="func_name">pow</a> <a href="#rshift" class="func_name">rshift</a> <a href="#take" class="func_name">take</a></div></div><hr><div><h2 id="tuck" class="func_name">tuck <a href="#tuck" class="self_link">¶</a></h2><p></p><div class="notes"><p>[dup] the item on the top of the stack under the second item on the
+in Lisp, or preprocessor directives in C.</div><div class="backlinks"><h3>Used By</h3><a href="#drop" class="func_name">drop</a> <a href="#getitem" class="func_name">getitem</a> <a href="#grabN" class="func_name">grabN</a> <a href="#lshift" class="func_name">lshift</a> <a href="#pow" class="func_name">pow</a> <a href="#rshift" class="func_name">rshift</a> <a href="#take" class="func_name">take</a></div></div><hr><div><h2 id="tuck" class="func_name">tuck <a href="#tuck" class="self_link">¶</a></h2><p></p><div class="notes"><p>[dup] the item on the top of the stack under the second item on the
stack.</p>
<pre><code> a b tuck
--------------
<pre><code> [a ...] uncons
--------------------
a [...]
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#first">first</a>] <a href="#dupdip">dupdip</a> <a href="#rest">rest</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>This is the inverse of [cons].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#cons" class="func_name">cons</a></div><div class="backlinks"><h3>Used By</h3><a href="#first" class="func_name">first</a> <a href="#07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="func_name">first_two</a> <a href="#rest" class="func_name">rest</a> <a href="#shift" class="func_name">shift</a> <a href="#stuncons" class="func_name">stuncons</a> <a href="#unswons" class="func_name">unswons</a></div></div><hr><div><h2 id="unique" class="func_name">unique <a href="#unique" class="self_link">¶</a></h2><p></p><div class="notes"><p>Given a list remove duplicate items.</p></div></div><hr><div><h2 id="unit" class="func_name">unit <a href="#unit" class="self_link">¶</a></h2><p></p><div class="notes"><pre><code> a unit
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#first">first</a>] <a href="#dupdip">dupdip</a> <a href="#rest">rest</a></div></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>This is the inverse of [cons].</p></div></div><div class="crosslinks"><h3>See Also</h3><a href="#cons" class="func_name">cons</a></div><div class="backlinks"><h3>Used By</h3><a href="#first" class="func_name">first</a> <a href="#07b63cfff44ede6136263bf5857f5174d6e3657dfa7a1d9bb018089ee03d7236" class="func_name">first_two</a> <a href="#rest" class="func_name">rest</a> <a href="#shift" class="func_name">shift</a> <a href="#stuncons" class="func_name">stuncons</a> <a href="#" class="func_name">uncons-two</a> <a href="#unswons" class="func_name">unswons</a></div></div><hr><div><h2 id="unique" class="func_name">unique <a href="#unique" class="self_link">¶</a></h2><p></p><div class="notes"><p>Given a list remove duplicate items.</p></div></div><hr><div><h2 id="unit" class="func_name">unit <a href="#unit" class="self_link">¶</a></h2><p></p><div class="notes"><pre><code> a unit
------------
[a]
-</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[] <a href="#cons">cons</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#quoted" class="func_name">quoted</a> <a href="#ee391b3e0636502027aa14f8e4fd6498ee690f4cff6ebc247120e4cbb583a774" class="func_name">range_to_zero</a></div></div><hr><div><h2 id="unquoted" class="func_name">unquoted <a href="#unquoted" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Unquote (using [i]) the list that is second on the stack.</p>
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[] <a href="#cons">cons</a></div></div><div class="backlinks"><h3>Used By</h3><a href="#" class="func_name">quote-two</a> <a href="#quoted" class="func_name">quoted</a> <a href="#ee391b3e0636502027aa14f8e4fd6498ee690f4cff6ebc247120e4cbb583a774" class="func_name">range_to_zero</a></div></div><hr><div><h2 id="unquoted" class="func_name">unquoted <a href="#unquoted" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Unquote (using [i]) the list that is second on the stack.</p>
<h3>Example</h3>
<pre><code> 1 2 [3 4] 5 unquoted
--------------------------
<h3>Example</h3>
<pre><code> [1 2 3] [4 5 6] zip
-------------------------
- [[4 1] [5 2] [6 3]]
-</code></pre></div></div><hr><div><h2 id="565d240f5343e625ae579a4d45a770f1f02c6368b5ed4d06da4fbe6f47c28866" class="func_name">|| <a href="#565d240f5343e625ae579a4d45a770f1f02c6368b5ed4d06da4fbe6f47c28866" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Short-circuiting Boolean OR</p></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>Accept two quoted programs, run the first and expect a Boolean value, if
+ [[1 4] [2 5] [3 6]]
+</code></pre></div><div class="definition_wrapper"><h3>Definition</h3><div class="definition">[<a href="#null">null</a>] [<a href="#pop">pop</a>] [<a href="#">uncons-pair</a>] [<a href="#i">i</a> <a href="#cons">cons</a>] <a href="#genrec">genrec</a></div></div></div><hr><div><h2 id="565d240f5343e625ae579a4d45a770f1f02c6368b5ed4d06da4fbe6f47c28866" class="func_name">|| <a href="#565d240f5343e625ae579a4d45a770f1f02c6368b5ed4d06da4fbe6f47c28866" class="self_link">¶</a></h2><p><span class="kind">combinator</span> </p><div class="notes"><p>Short-circuiting Boolean OR</p></div><div class="discussion_wrapper"><h3>Discussion</h3><div class="discussion"><p>Accept two quoted programs, run the first and expect a Boolean value, if
it’s <code>false</code> pop it and run the second program (which should also return a
Boolean value) otherwise pop the second program (leaving <code>true</code> on the
stack.)