From df6d6a0fa85c07c67eaa40a097953e3290f5d356 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 7 Jul 2021 19:59:57 -0400 Subject: Continued editing and links --- docs/doc/range.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/doc/range.html') diff --git a/docs/doc/range.html b/docs/doc/range.html index c56da6e3..0620d0d8 100644 --- a/docs/doc/range.html +++ b/docs/doc/range.html @@ -16,7 +16,7 @@ β”˜

It's really two different functions packed together: if 𝕩 is a natural numberβ€”a lengthβ€”then it returns a list of numeric indices, but if it's a list of numbers, then it returns an array of list indices. This means the result always has depth one more than the argument.

-

The two kinds of index correspond to BQN's two selection functions: Select (⊏) works with indices along an axis, which are numbers, and Pick (βŠ‘) works with element indices, which are lists. The examples below would fail if we swapped these around. Each result from Range is a length-6 list, but their elements are different.

+

The two kinds of index correspond to BQN's two selection functions: Select (⊏) works with indices along an axis, which are numbers, and Pick (βŠ‘) works with element indices, which are lists. The examples below would fail if we swapped these around. Each result from Range is a length-6 list, but their elements are different.

↗️
    ↕6
 ⟨ 0 1 2 3 4 5 ⟩
 
@@ -29,7 +29,7 @@
     (β†•βŸ¨6⟩) βŠ‘ " pick "
 " pick "
 
-

They also correspond to Length (β‰ ) and Shape (β‰’): for an array a, ↕≠a gives the indices of major cells, while ↕≒a gives the indices of all elements.

+

They also correspond to Length (β‰ ) and Shape (β‰’): for an array a, ↕≠a gives the indices of major cells, while ↕≒a gives the indices of all elements.

↗️
    a ← 4β€Ώ2β₯Š@
 
     ↕ β‰  a
@@ -85,7 +85,7 @@
     b Γ— ↕≠b
 ⟨ 0 1 2 0 0 0 6 0 ⟩
 
-

Now at any given position the index of the last 1, if there is any, is the maximum of all the adjusted indices so far. That's a scan ⌈`.

+

Now at any given position the index of the last 1, if there is any, is the maximum of all the adjusted indices so far. That's a scan ⌈`.

↗️
    ⌈` b Γ— ↕≠b
 ⟨ 0 1 2 2 2 2 6 6 ⟩
 
-- 
cgit v1.2.3