aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/primitive.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doc/primitive.html')
-rw-r--r--docs/doc/primitive.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/doc/primitive.html b/docs/doc/primitive.html
index ef7f8d86..ebb09c09 100644
--- a/docs/doc/primitive.html
+++ b/docs/doc/primitive.html
@@ -4,11 +4,11 @@
<title>BQN primitives</title>
</head>
<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">doc</a></div>
-<h1 id="bqn-primitives">BQN primitives</h1>
+<h1 id="bqn-primitives"><a class="header" href="#bqn-primitives">BQN primitives</a></h1>
<p><em>Primitives</em> are the basic functions and modifiers built into the language, written with individual glyphs (more about the concept <a href="../commentary/primitive.html">here</a>). The role of a primitive when written always matches its type (but you can use its value in other roles by assigning it, or other methods).</p>
<p>Primitives have no side effects other than errors, and can't perform infinite computations, except when a primitive modifier calls an operand function that does one of these things (this can only happen when arguments are passed, as primitive modifiers are always deferred). Side effects here include both writing state such as variables or printed output, and reading any outside state, so that a function without them always returns the same result if passed the same arguments. Since trains and list notation have the same nice properties, tacit code written entirely with primitives, trains, and lists always describes finite, self-contained computations.</p>
<p>Recursion is the primary way to perform potentially infinite computations in BQN, and it can be packaged into <a href="control.html">control structures</a> like <code><span class='Function'>While</span></code> for ease of use. A given BQN implementation might also provide <a href="../spec/system.html">system values</a> for &quot;impure&quot; tasks like file access or other I/O.</p>
-<h2 id="functions">Functions</h2>
+<h2 id="functions"><a class="header" href="#functions">Functions</a></h2>
<p>Functions that have significant differences from APL equivalents or don't appear in APL are marked with an asterisk.</p>
<table>
<thead>
@@ -236,7 +236,7 @@
</tr>
</tbody>
</table>
-<h2 id="modifiers">Modifiers</h2>
+<h2 id="modifiers"><a class="header" href="#modifiers">Modifiers</a></h2>
<svg viewBox='0 0 850 530'>
<g font-size='20px' text-anchor='middle' transform='translate(145,20)'>
<rect class='code' stroke-width='1' rx='12' x='-120.4' y='1' width='240.8' height='205'/>