From 8342ba5e9392811dbc0514a97e847a44a5b330a2 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 6 Jun 2022 21:29:06 -0400 Subject: When I wrote all these docs did I really understand I'd have to edit them? --- docs/doc/range.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/doc/range.html') diff --git a/docs/doc/range.html b/docs/doc/range.html index 8065a34a..887f9833 100644 --- a/docs/doc/range.html +++ b/docs/doc/range.html @@ -5,7 +5,7 @@

Range

-

Range () is a monadic function that creates arrays of indices (like APL's famous iota function). Each element in the result is its own index.

+

Range () is a monadic function that creates arrays of indices, like APL's famous iota function . Each element in the result is its own index.

↗️
     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  42@
 
       a
@@ -54,11 +54,11 @@
     2  4
 ⟨ 2 3 ⟩
 
-

The result of 𝕩 is a list of length 𝕩, but doesn't include 𝕩 itself. That's just how counting starting at 0 works. It does mean we can create a length-0 list easily:

+

The result of 𝕩 is a list of length 𝕩, but doesn't include 𝕩 itself. That's just how counting starting at 0 works (but a nice trick if you do want to include 𝕩 is 𝕩). It means we can create a length-0 list easily:

↗️
     0
 ⟨⟩
 
-

Like all other results of on a number, 0 has a fill of 0.

+

As with any other number argument, 0 has a fill of 0.

↗️
    4  0
 ⟨ 0 0 0 0 ⟩
 
@@ -72,7 +72,7 @@
     »3 'b'+↕8
 "   bcdef"
 
-

One interesting use of Range is to find, at each position in a boolean list, the most recent index that has a 1. To do this, first get the array of indices for b, ↕≠b. Then multiply b, reducing indices where a 0 is found to 0.

+

One interesting use of Range is to find, at each position in a boolean list, the most recent index that has a 1. To do this, first get the array of indices for b, ↕≠b. Then multiply by b, reducing indices where a 0 is found to 0.

↗️
     b  01100010
 ⟨ 0 1 1 0 0 0 1 0 ⟩
 
@@ -97,7 +97,7 @@
 ⟨ 0 2 3 3 3 3 7 7 ⟩
 

List range

-

When the argument is a list of numbers, the result is an array of lists.

+

When 𝕩 is a list of numbers, the result is an array of lists.

↗️
     234
 ┌─                                         
 ╎ ⟨ 0 0 0 ⟩ ⟨ 0 0 1 ⟩ ⟨ 0 0 2 ⟩ ⟨ 0 0 3 ⟩  
@@ -109,7 +109,7 @@
   ⟨ 1 2 0 ⟩ ⟨ 1 2 1 ⟩ ⟨ 1 2 2 ⟩ ⟨ 1 2 3 ⟩  
                                           ┘
 
-

This array, which contains all possible choices of one natural number less than each element of 𝕩, can also be produced using Range on numbers only, along with Table ().

+

This array, which contains all possible choices of a natural number below each element of 𝕩, can also be produced using Range on numbers only, along with Table ().

↗️
    (<⟨⟩) ⌜´ ¨ 234
 ┌─                                         
 ╎ ⟨ 0 0 0 ⟩ ⟨ 0 0 1 ⟩ ⟨ 0 0 2 ⟩ ⟨ 0 0 3 ⟩  
-- 
cgit v1.2.3