diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-07-27 22:28:33 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-07-27 22:28:33 -0400 |
| commit | 723f2735dbd59f6000caecddccf321c8b03512fa (patch) | |
| tree | 3a58ad6b88ea5b45707c4924276e2f77ee87e3f1 /docs/doc/identity.html | |
| parent | 00abceb4b2b43acd7fbb100aac41f759f643f5e7 (diff) | |
Undo documentation
Diffstat (limited to 'docs/doc/identity.html')
| -rw-r--r-- | docs/doc/identity.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/identity.html b/docs/doc/identity.html index 196b219c..ec710ab6 100644 --- a/docs/doc/identity.html +++ b/docs/doc/identity.html @@ -19,7 +19,7 @@ "left" </pre> <p>Depending on your past experiences, this could cause some confusion: built-in support for functions that do nothing? Documentation should say why a feature's there and how to use it, not just what it does, so we'll try to address this below. The most important single use is for tacit programming, but there are a variety of other uses as well.</p> -<p>Of course, it's easy to write block functions <code><span class='Brace'>{</span><span class='Value'>𝕩</span><span class='Brace'>}</span></code> and <code><span class='Brace'>{</span><span class='Value'>𝕨</span><span class='Brace'>}</span></code> that return particular arguments. While I would already make <code><span class='Function'>⊣</span></code> and <code><span class='Function'>⊢</span></code> primitives just because they are common and important, there are also specific disadvantages to using blocks. They fail to indicate that there are no side effects, as primitives would, and they also need special casing for the interpreter to manipulate them when applying Undo (<code><span class='Modifier'>⁼</span></code>) or making other inferences.</p> +<p>Of course, it's easy to write block functions <code><span class='Brace'>{</span><span class='Value'>𝕩</span><span class='Brace'>}</span></code> and <code><span class='Brace'>{</span><span class='Value'>𝕨</span><span class='Brace'>}</span></code> that return particular arguments. While I would already make <code><span class='Function'>⊣</span></code> and <code><span class='Function'>⊢</span></code> primitives just because they are common and important, there are also specific disadvantages to using blocks. They fail to indicate that there are no side effects, as primitives would, and they also need special casing for the interpreter to manipulate them when applying <a href="undo.html">Undo</a> (<code><span class='Modifier'>⁼</span></code>) or making other inferences.</p> <h2 id="filling-arrays">Filling arrays</h2> <p>What's the easiest way to create a matrix with 0 on the first row, 1 on the second, and so on? Probably this one, with <a href="map.html#table">table</a>:</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KOKGlTQpIOKKo+KMnCDihpU1">↗️</a><pre> <span class='Paren'>(</span><span class='Function'>↕</span><span class='Number'>4</span><span class='Paren'>)</span> <span class='Function'>⊣</span><span class='Modifier'>⌜</span> <span class='Function'>↕</span><span class='Number'>5</span> |
