aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/identity.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-06 22:18:20 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-06 22:18:20 -0400
commit4d602ea36183e62e463cea08900a16ea6240a03f (patch)
treef21aef763d907d7e1b093cf633c544cfcdd0a085 /docs/doc/identity.html
parent97e31a20cefe21c1627f33057d20d7970511754f (diff)
Editing and links
Diffstat (limited to 'docs/doc/identity.html')
-rw-r--r--docs/doc/identity.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/doc/identity.html b/docs/doc/identity.html
index f865e960..196b219c 100644
--- a/docs/doc/identity.html
+++ b/docs/doc/identity.html
@@ -21,7 +21,7 @@
<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>
<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</a>:</p>
+<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>
โ”Œโ”€
โ•ต 0 0 0 0 0
@@ -30,7 +30,7 @@
3 3 3 3 3
โ”˜
</pre>
-<p>The right argument <code><span class='Function'>โ†•</span><span class='Number'>5</span></code> could be any length-5 list, as its values aren't used. With <code><span class='Number'>5</span><span class='Function'>โฅŠ</span><span class='Number'>0</span></code>, we could use <code><span class='Function'>+</span><span class='Modifier'>โŒœ</span></code> instead, but requiring a specific argument seems artificial. A similar pattern applies with Each:</p>
+<p>The right argument <code><span class='Function'>โ†•</span><span class='Number'>5</span></code> could be any length-5 list, as its values aren't used. With <code><span class='Number'>5</span><span class='Function'>โฅŠ</span><span class='Number'>0</span></code>, we could use <code><span class='Function'>+</span><span class='Modifier'>โŒœ</span></code> instead, but requiring a specific argument seems artificial. A similar pattern applies with <a href="map.html#each">Each</a>:</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KOKMveKGlTQpIOKKo8KoIOKGlTTigL81">โ†—๏ธ</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'>4</span><span class='Ligature'>โ€ฟ</span><span class='Number'>5</span>
โ”Œโ”€
โ•ต 3 3 3 3 3