diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-10-26 13:17:02 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-10-26 13:17:02 -0400 |
| commit | db6239e74f13f6335c9c77e7a5dfa7461017f3ec (patch) | |
| tree | a1ad62a221286c25753e5166ad326f466a9049c5 /docs/doc/prefixes.html | |
| parent | b1e428165cd16f854bfc32b3467dfe915e2b762b (diff) | |
Format empty arrays using ↕, not ⥊
Diffstat (limited to 'docs/doc/prefixes.html')
| -rw-r--r-- | docs/doc/prefixes.html | 160 |
1 files changed, 80 insertions, 80 deletions
diff --git a/docs/doc/prefixes.html b/docs/doc/prefixes.html index 21bbeff7..5f951c07 100644 --- a/docs/doc/prefixes.html +++ b/docs/doc/prefixes.html @@ -99,46 +99,46 @@ <p>We might view a slice as a selection for not two but <em>three</em> parameters: the number of cells before, in, and after the slice. The conditions are that each parameter, being a length, is at least 0, and the total of the three parameters is equal to the array length. With three parameters and one equality constraint, the space of slices is two-dimensional; the above ways to enumerate it each pick two parameters and allow the third to be dependent on these two. If you're familiar with <a href="https://en.wikipedia.org/wiki/Barycentric_coordinate_system">barycentric coordinates</a> on a triangle, this should sound very familiar because that's exactly what the three parameters are!</p> <p>We might also consider the question of slices along multiple axes. Because axes are orthogonal, we can choose such a slice by independently slicing along each axis. To use the homogeneous shape of arrays as much as possible, the result should still only have two added layers of nesting for the two coordinates we choose, with all possible choices for the first axis along the axes of the outer array and those for the second along the axes of each inner array. Our Windows-based solution adapts to multidimensional arrays easily:</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KCjihpUxK+KJoik84o6JMuKImOKGlcKoPCkgM+KAvzLipYoiYWJjZGVmIg==&run">↗️</a><pre> <span class='Paren'>((</span><span class='Function'>↕</span><span class='Number'>1</span><span class='Function'>+≢</span><span class='Paren'>)</span><span class='Function'><</span><span class='Modifier2'>⎉</span><span class='Number'>2</span><span class='Modifier2'>∘</span><span class='Function'>↕</span><span class='Modifier'>¨</span><span class='Function'><</span><span class='Paren'>)</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Function'>⥊</span><span class='String'>"abcdef"</span> -┌─ -╵ ┌─ ┌─ ┌─ - ╵ ┌┐ ┌┐ ┌┐ ╵ 0‿1⥊⟨⟩ 0‿1⥊⟨⟩ ╵ 0‿2⥊⟨⟩ - └┘ └┘ └┘ 0‿1⥊⟨⟩ 0‿1⥊⟨⟩ 0‿2⥊⟨⟩ - ┌┐ ┌┐ ┌┐ 0‿1⥊⟨⟩ 0‿1⥊⟨⟩ 0‿2⥊⟨⟩ - └┘ └┘ └┘ 0‿1⥊⟨⟩ 0‿1⥊⟨⟩ 0‿2⥊⟨⟩ - ┌┐ ┌┐ ┌┐ ┘ ┘ - └┘ └┘ └┘ - ┌┐ ┌┐ ┌┐ - └┘ └┘ └┘ - ┘ - ┌─ ┌─ ┌─ - ╵ ┌┐ ┌┐ ┌┐ ╵ ┌─ ┌─ ╵ ┌─ - ╵ ╵ ╵ ╵"a" ╵"b" ╵"ab" - ┘ ┘ ┘ ┘ ┘ ┘ - ┌┐ ┌┐ ┌┐ ┌─ ┌─ ┌─ - ╵ ╵ ╵ ╵"c" ╵"d" ╵"cd" - ┘ ┘ ┘ ┘ ┘ ┘ - ┌┐ ┌┐ ┌┐ ┌─ ┌─ ┌─ - ╵ ╵ ╵ ╵"e" ╵"f" ╵"ef" - ┘ ┘ ┘ ┘ ┘ ┘ - ┘ ┘ ┘ - ┌─ ┌─ ┌─ - ╵ ┌┐ ┌┐ ┌┐ ╵ ┌─ ┌─ ╵ ┌─ - ╵ ╵ ╵ ╵"a ╵"b ╵"ab - c" d" cd" - ┘ ┘ ┘ ┘ ┘ ┘ - ┌┐ ┌┐ ┌┐ ┌─ ┌─ ┌─ - ╵ ╵ ╵ ╵"c ╵"d ╵"cd - e" f" ef" - ┘ ┘ ┘ ┘ ┘ ┘ - ┘ ┘ ┘ - ┌─ ┌─ ┌─ - ╵ ┌┐ ┌┐ ┌┐ ╵ ┌─ ┌─ ╵ ┌─ - ╵ ╵ ╵ ╵"a ╵"b ╵"ab - c d cd - e" f" ef" - ┘ ┘ ┘ ┘ ┘ ┘ - ┘ ┘ ┘ - ┘ +┌─ +╵ ┌─ ┌─ ┌─ + ╵ ┌┐ ┌┐ ┌┐ ╵ ↕0‿1 ↕0‿1 ╵ ↕0‿2 + └┘ └┘ └┘ ↕0‿1 ↕0‿1 ↕0‿2 + ┌┐ ┌┐ ┌┐ ↕0‿1 ↕0‿1 ↕0‿2 + └┘ └┘ └┘ ↕0‿1 ↕0‿1 ↕0‿2 + ┌┐ ┌┐ ┌┐ ┘ ┘ + └┘ └┘ └┘ + ┌┐ ┌┐ ┌┐ + └┘ └┘ └┘ + ┘ + ┌─ ┌─ ┌─ + ╵ ┌┐ ┌┐ ┌┐ ╵ ┌─ ┌─ ╵ ┌─ + ╵ ╵ ╵ ╵"a" ╵"b" ╵"ab" + ┘ ┘ ┘ ┘ ┘ ┘ + ┌┐ ┌┐ ┌┐ ┌─ ┌─ ┌─ + ╵ ╵ ╵ ╵"c" ╵"d" ╵"cd" + ┘ ┘ ┘ ┘ ┘ ┘ + ┌┐ ┌┐ ┌┐ ┌─ ┌─ ┌─ + ╵ ╵ ╵ ╵"e" ╵"f" ╵"ef" + ┘ ┘ ┘ ┘ ┘ ┘ + ┘ ┘ ┘ + ┌─ ┌─ ┌─ + ╵ ┌┐ ┌┐ ┌┐ ╵ ┌─ ┌─ ╵ ┌─ + ╵ ╵ ╵ ╵"a ╵"b ╵"ab + c" d" cd" + ┘ ┘ ┘ ┘ ┘ ┘ + ┌┐ ┌┐ ┌┐ ┌─ ┌─ ┌─ + ╵ ╵ ╵ ╵"c ╵"d ╵"cd + e" f" ef" + ┘ ┘ ┘ ┘ ┘ ┘ + ┘ ┘ ┘ + ┌─ ┌─ ┌─ + ╵ ┌┐ ┌┐ ┌┐ ╵ ┌─ ┌─ ╵ ┌─ + ╵ ╵ ╵ ╵"a ╵"b ╵"ab + c d cd + e" f" ef" + ┘ ┘ ┘ ┘ ┘ ┘ + ┘ ┘ ┘ + ┘ </pre> <p>This array can be <a href="join.html">joined</a>, indicating that the length of each inner axis depends only on the position in the corresponding outer axis (let's also drop those empty slices to take up less space).</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oi+IDHigL8xIOKGkyAoKOKGlTEr4omiKTzijoky4oiY4oaVwqg8KSAz4oC/MuKliiJhYmNkZWYi&run">↗️</a><pre> <span class='Function'>∾</span> <span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>1</span> <span class='Function'>↓</span> <span class='Paren'>((</span><span class='Function'>↕</span><span class='Number'>1</span><span class='Function'>+≢</span><span class='Paren'>)</span><span class='Function'><</span><span class='Modifier2'>⎉</span><span class='Number'>2</span><span class='Modifier2'>∘</span><span class='Function'>↕</span><span class='Modifier'>¨</span><span class='Function'><</span><span class='Paren'>)</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Function'>⥊</span><span class='String'>"abcdef"</span> @@ -171,44 +171,44 @@ <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=UHJlZnMg4oaQICjihpUxK+KJoinihpHCqDwKU3VmZnMg4oaQICjihpUxK+KJoinihpPCqDwKUHJlZnPCqFN1ZmZzIDPigL8y4qWKImFiY2RlZiI=&run">↗️</a><pre> <span class='Function'>Prefs</span> <span class='Gets'>←</span> <span class='Paren'>(</span><span class='Function'>↕</span><span class='Number'>1</span><span class='Function'>+≢</span><span class='Paren'>)</span><span class='Function'>↑</span><span class='Modifier'>¨</span><span class='Function'><</span> <span class='Function'>Suffs</span> <span class='Gets'>←</span> <span class='Paren'>(</span><span class='Function'>↕</span><span class='Number'>1</span><span class='Function'>+≢</span><span class='Paren'>)</span><span class='Function'>↓</span><span class='Modifier'>¨</span><span class='Function'><</span> <span class='Function'>Prefs</span><span class='Modifier'>¨</span><span class='Function'>Suffs</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Function'>⥊</span><span class='String'>"abcdef"</span> -┌─ -╵ ┌─ ┌─ ┌─ - ╵ ┌┐ 0‿1⥊⟨⟩ 0‿2⥊⟨⟩ ╵ ┌┐ 0‿1⥊⟨⟩ ╵ ┌┐ - └┘ └┘ └┘ - ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ - ╵ ╵"a" ╵"ab" ╵ ╵"b" ╵ - ┘ ┘ ┘ ┘ ┘ ┘ - ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ - ╵ ╵"a ╵"ab ╵ ╵"b ╵ - c" cd" d" - ┘ ┘ ┘ ┘ ┘ ┘ - ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ - ╵ ╵"a ╵"ab ╵ ╵"b ╵ - c cd d - e" ef" f" - ┘ ┘ ┘ ┘ ┘ ┘ - ┘ ┘ ┘ - ┌─ ┌─ ┌─ - ╵ ┌┐ 0‿1⥊⟨⟩ 0‿2⥊⟨⟩ ╵ ┌┐ 0‿1⥊⟨⟩ ╵ ┌┐ - └┘ └┘ └┘ - ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ - ╵ ╵"c" ╵"cd" ╵ ╵"d" ╵ - ┘ ┘ ┘ ┘ ┘ ┘ - ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ - ╵ ╵"c ╵"cd ╵ ╵"d ╵ - e" ef" f" - ┘ ┘ ┘ ┘ ┘ ┘ - ┘ ┘ ┘ - ┌─ ┌─ ┌─ - ╵ ┌┐ 0‿1⥊⟨⟩ 0‿2⥊⟨⟩ ╵ ┌┐ 0‿1⥊⟨⟩ ╵ ┌┐ - └┘ └┘ └┘ - ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ - ╵ ╵"e" ╵"ef" ╵ ╵"f" ╵ - ┘ ┘ ┘ ┘ ┘ ┘ - ┘ ┘ ┘ - ┌─ ┌─ ┌─ - ╵ ┌┐ 0‿1⥊⟨⟩ 0‿2⥊⟨⟩ ╵ ┌┐ 0‿1⥊⟨⟩ ╵ ┌┐ - └┘ └┘ └┘ - ┘ ┘ ┘ - ┘ +┌─ +╵ ┌─ ┌─ ┌─ + ╵ ┌┐ ↕0‿1 ↕0‿2 ╵ ┌┐ ↕0‿1 ╵ ┌┐ + └┘ └┘ └┘ + ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ + ╵ ╵"a" ╵"ab" ╵ ╵"b" ╵ + ┘ ┘ ┘ ┘ ┘ ┘ + ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ + ╵ ╵"a ╵"ab ╵ ╵"b ╵ + c" cd" d" + ┘ ┘ ┘ ┘ ┘ ┘ + ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ + ╵ ╵"a ╵"ab ╵ ╵"b ╵ + c cd d + e" ef" f" + ┘ ┘ ┘ ┘ ┘ ┘ + ┘ ┘ ┘ + ┌─ ┌─ ┌─ + ╵ ┌┐ ↕0‿1 ↕0‿2 ╵ ┌┐ ↕0‿1 ╵ ┌┐ + └┘ └┘ └┘ + ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ + ╵ ╵"c" ╵"cd" ╵ ╵"d" ╵ + ┘ ┘ ┘ ┘ ┘ ┘ + ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ + ╵ ╵"c ╵"cd ╵ ╵"d ╵ + e" ef" f" + ┘ ┘ ┘ ┘ ┘ ┘ + ┘ ┘ ┘ + ┌─ ┌─ ┌─ + ╵ ┌┐ ↕0‿1 ↕0‿2 ╵ ┌┐ ↕0‿1 ╵ ┌┐ + └┘ └┘ └┘ + ┌┐ ┌─ ┌─ ┌┐ ┌─ ┌┐ + ╵ ╵"e" ╵"ef" ╵ ╵"f" ╵ + ┘ ┘ ┘ ┘ ┘ ┘ + ┘ ┘ ┘ + ┌─ ┌─ ┌─ + ╵ ┌┐ ↕0‿1 ↕0‿2 ╵ ┌┐ ↕0‿1 ╵ ┌┐ + └┘ └┘ └┘ + ┘ ┘ ┘ + ┘ </pre> |
