aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/match.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doc/match.html')
-rw-r--r--docs/doc/match.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/match.html b/docs/doc/match.html
index dbf0b301..3fd112f0 100644
--- a/docs/doc/match.html
+++ b/docs/doc/match.html
@@ -22,7 +22,7 @@
<span class='String'>&quot;abc&quot;</span> <span class='Function'>≡</span> <span class='String'>&quot;ab&quot;</span>
0
</pre>
-<p>Match compares arrays based on their fundamental properties—<a href="shape.html">shape</a> and elements—and not the <a href="../spec/inferred.html#fill-elements">fill element</a>, which is an inferred property. Since it can be computed differently in different implementations, using the fill element in Match could lead to some confusing results. Even if the implementation doesn't define a fill for <code><span class='String'>'a'</span><span class='Ligature'>‿</span><span class='String'>'b'</span><span class='Ligature'>‿</span><span class='String'>'c'</span></code>, it should still be considered to match <code><span class='String'>&quot;abc&quot;</span></code>.</p>
+<p>Match compares arrays based on their fundamental properties—<a href="shape.html">shape</a> and elements—and not the <a href="fill.html">fill element</a>, which is an inferred property. Since it can be computed differently in different implementations, using the fill element in Match could lead to some confusing results. Even if the implementation doesn't define a fill for <code><span class='String'>'a'</span><span class='Ligature'>‿</span><span class='String'>'b'</span><span class='Ligature'>‿</span><span class='String'>'c'</span></code>, it should still be considered to match <code><span class='String'>&quot;abc&quot;</span></code>.</p>
<p>To give a precise definition, two arrays are considered to match if they have the same shape and all corresponding elements from the two arrays match. Every array has a finite <a href="depth.html">depth</a> so this recursive definition always ends up comparing non-arrays, or atoms. An array never matches an atom, so the result if only one argument is an atom is <code><span class='Number'>0</span></code>. The interesting case is when both arguments are atoms, discussed below.</p>
<h2 id="atomic-equality">Atomic equality</h2>
<p>Atoms in BQN have six possible <a href="types.html">types</a>: number, character, function, 1-modifier, 2-modifier, and namespace. Equality is not allowed to fail for any two arguments, so it needs to be defined on all of these types.</p>