aboutsummaryrefslogtreecommitdiff
path: root/docs/tutorial/list.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-08 16:14:51 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-08 16:18:16 -0500
commitc5eef0418df2ae6a97c54839fa010ff60d96f78b (patch)
tree7ad892f4d416cfcf380e3a26164df4d240a82037 /docs/tutorial/list.html
parentded5581732544165dbb14fb2481ab3855104c638 (diff)
Add error messages to generated markdown docs with •CurrentError (fixes #22)
Diffstat (limited to 'docs/tutorial/list.html')
-rw-r--r--docs/tutorial/list.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/tutorial/list.html b/docs/tutorial/list.html
index 4df69829..35853585 100644
--- a/docs/tutorial/list.html
+++ b/docs/tutorial/list.html
@@ -338,7 +338,7 @@
</pre>
<p>Multiplication is harder, and if we try to multiply by the place value list directly it doesn't go so well.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KOKMvTLii4bihpU4KSDDlyAnMCcgLcucICIwMTAwMTExMCLigL8iMDExMDAxMDEi4oC/IjAxMTEwMDEwIuKAvyIwMTEwMDEwMCLigL8iMDAxMDAwMDEi">↗️</a><pre> <span class='Paren'>(</span><span class='Function'>⌽</span><span class='Number'>2</span><span class='Function'>⋆↕</span><span class='Number'>8</span><span class='Paren'>)</span> <span class='Function'>×</span> <span class='String'>'0'</span> <span class='Function'>-</span><span class='Modifier'>˜</span> <span class='String'>&quot;01001110&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;01100101&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;01110010&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;01100100&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;00100001&quot;</span>
-ERROR
+<span class='Error'>Error: ×: Expected equal shape prefix (⟨8⟩ ≡ ≢𝕨, ⟨5⟩ ≡ ≢𝕩)</span>
</pre>
<p>This is because the list on the left has length 8 while the list on the right has length 5. The <em>elements</em> of the list on the right have length 8, but BQN can't be expected to know you want to connect the two arguments in that particular way. Especially considering that if you happen to have 8 characters then the right argument <em>will</em> have length 8!</p>
<p>There are a few ways to handle this. What we'll do is <em>bind</em> the place values to <code><span class='Function'>×</span></code> using the 2-modifier <code><span class='Modifier2'>⊸</span></code>. This modifier attaches a left argument to a function.</p>