aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/couple.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-07 20:57:51 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-07 20:57:51 -0400
commitc7ef3aabb54791b597d4095011ff048c2a13f6ac (patch)
tree45967d042b204df64097a57cf6c72c4b4be8d1f6 /docs/doc/couple.html
parent7bf2aa4054b8378a76dff63acdccbcdad91f68e6 (diff)
Document use of fill elements for merge of empty
Diffstat (limited to 'docs/doc/couple.html')
-rw-r--r--docs/doc/couple.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/couple.html b/docs/doc/couple.html
index 164c0fd5..1923e9d1 100644
--- a/docs/doc/couple.html
+++ b/docs/doc/couple.html
@@ -65,7 +65,7 @@
<span class='Function'>∾</span> <span class='Function'>⥊</span> <span class='Function'>⥊</span><span class='Modifier'>¨</span> <span class='Value'>a</span>
"ABrstABuvwABxyzCDrstCDuvwCDxyz"
</pre>
-<p>The way this happens, and the constraint that all inner arrays have the same shape, is closely connected to the concept of an array, and like <a href="map.html#table">Table</a> <code><span class='Modifier'>⌜</span></code>, Merge might be considered a fundamental way to build up multidimensional arrays from lists. In both cases rank-0 or <a href="enclose.html#whats-a-unit">unit</a> arrays are somewhat special. They are the <a href="fold.html#identity-values">identity value</a> of a function with Table, and can be produced by Merge <a href="undo.html">inverse</a>, <code><span class='Function'>&gt;</span><span class='Modifier'>⁼</span></code> <strong>on a list</strong>, which forces either the outer or inner shape to be empty (BQN chooses <code><span class='Function'>&gt;</span><span class='Modifier'>⁼</span></code> to be <code><span class='Function'>&lt;</span></code>, but only on an array, as <code><span class='Function'>&gt;</span></code> cannot produce non-arrays). Merge has another catch as well: it cannot produce arrays with a <code><span class='Number'>0</span></code> in the shape, except at the end, unless fills can be specified.</p>
+<p>The way this happens, and the constraint that all inner arrays have the same shape, is closely connected to the concept of an array, and like <a href="map.html#table">Table</a> <code><span class='Modifier'>⌜</span></code>, Merge might be considered a fundamental way to build up multidimensional arrays from lists. In both cases rank-0 or <a href="enclose.html#whats-a-unit">unit</a> arrays are somewhat special. They are the <a href="fold.html#identity-values">identity value</a> of a function with Table, and can be produced by Merge <a href="undo.html">inverse</a>, <code><span class='Function'>&gt;</span><span class='Modifier'>⁼</span></code> <strong>on a list</strong>, which forces either the outer or inner shape to be empty (BQN chooses <code><span class='Function'>&gt;</span><span class='Modifier'>⁼</span></code> to be <code><span class='Function'>&lt;</span></code>, but only on an array, as <code><span class='Function'>&gt;</span></code> cannot produce non-arrays). Merge has another catch as well: it cannot produce arrays with a <code><span class='Number'>0</span></code> in the shape, except at the end, without relying on a <a href="fill.html">fill</a> element.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIGUg4oaQIOKfqOKfqcKoIOKGlTMK4omiID4gZQriiaIgPiA+IGU=">↗️</a><pre> <span class='Function'>⊢</span> <span class='Value'>e</span> <span class='Gets'>←</span> <span class='Bracket'>⟨⟩</span><span class='Modifier'>¨</span> <span class='Function'>↕</span><span class='Number'>3</span>
⟨ ⟨⟩ ⟨⟩ ⟨⟩ ⟩
<span class='Function'>≢</span> <span class='Function'>&gt;</span> <span class='Value'>e</span>