aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-09-03 08:02:35 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-09-03 08:02:35 -0400
commit18054b581d332cc9142cdd0ff1c9bec38d92aef5 (patch)
treea8d61a6e318535944d02698772eabf1d3993561b
parent53c2bdfac6f48ca6be9fee718d9822f710826d06 (diff)
Swapped + for -
-rw-r--r--commentary/why.md2
-rw-r--r--docs/commentary/why.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/commentary/why.md b/commentary/why.md
index 03ef81fd..69f5c6c6 100644
--- a/commentary/why.md
+++ b/commentary/why.md
@@ -134,6 +134,6 @@ It gets worse.
│0│1│2│
└─┴─┴─┘
-This should not be possible. `f` here doesn't behave like `+`, or quite like `|.`: in fact there is no function that does what `f` does. The result of `f` depends on the entire argument, but `<@f` encloses rank 0 components! How long would it take you to debug an issue like this? It's rare, but I've run into it in my own code and seen similar reports on the forums.
+This should not be possible. `f` here doesn't behave like `-`, or quite like `|.`: in fact there is no function that does what `f` does. The result of `f` depends on the entire argument, but `<@f` encloses rank 0 components! How long would it take you to debug an issue like this? It's rare, but I've run into it in my own code and seen similar reports on the forums.
The cause is that the value of `f` here—a named `g` function—is not just a name, but also comes with a function rank. The function rank is set by the assignment `f =: g`, and doesn't change along with `g`. Calling `f` doesn't rely on the rank, but `@` does, so `<@f` effectively becomes `<@|."-`, mixing the two versions of `g`. The only explanation I have for this one is implementation convenience.
diff --git a/docs/commentary/why.html b/docs/commentary/why.html
index 1fe07371..669f1b34 100644
--- a/docs/commentary/why.html
+++ b/docs/commentary/why.html
@@ -95,5 +95,5 @@
<span class='Value'>│</span><span class='Number'>0</span><span class='Value'>│</span><span class='Number'>1</span><span class='Value'>│</span><span class='Number'>2</span><span class='Value'>│</span>
<span class='Value'>└─┴─┴─┘</span>
</pre>
-<p>This should not be possible. <code><span class='Value'>f</span></code> here doesn't behave like <code><span class='Function'>+</span></code>, or quite like <code><span class='Function'>|</span><span class='Value'>.</span></code>: in fact there is no function that does what <code><span class='Value'>f</span></code> does. The result of <code><span class='Value'>f</span></code> depends on the entire argument, but <code><span class='Function'>&lt;</span><span class='String'>@</span><span class='Value'>f</span></code> encloses rank 0 components! How long would it take you to debug an issue like this? It's rare, but I've run into it in my own code and seen similar reports on the forums.</p>
+<p>This should not be possible. <code><span class='Value'>f</span></code> here doesn't behave like <code><span class='Function'>-</span></code>, or quite like <code><span class='Function'>|</span><span class='Value'>.</span></code>: in fact there is no function that does what <code><span class='Value'>f</span></code> does. The result of <code><span class='Value'>f</span></code> depends on the entire argument, but <code><span class='Function'>&lt;</span><span class='String'>@</span><span class='Value'>f</span></code> encloses rank 0 components! How long would it take you to debug an issue like this? It's rare, but I've run into it in my own code and seen similar reports on the forums.</p>
<p>The cause is that the value of <code><span class='Value'>f</span></code> here—a named <code><span class='Value'>g</span></code> function—is not just a name, but also comes with a function rank. The function rank is set by the assignment <code><span class='Value'>f</span> <span class='Function'>=</span><span class='Head'>:</span> <span class='Value'>g</span></code>, and doesn't change along with <code><span class='Value'>g</span></code>. Calling <code><span class='Value'>f</span></code> doesn't rely on the rank, but <code><span class='String'>@</span></code> does, so <code><span class='Function'>&lt;</span><span class='String'>@</span><span class='Value'>f</span></code> effectively becomes <code><span class='Function'>&lt;</span><span class='String'>@</span><span class='Function'>|</span><span class='Value'>.</span><span class='String'>&quot;</span><span class='Function'>-</span></code>, mixing the two versions of <code><span class='Value'>g</span></code>. The only explanation I have for this one is implementation convenience.</p>