From e2b07a5fd0bbaad232c717fb90a31d6c61d72bd4 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 14 Jul 2022 20:06:50 -0400 Subject: Try to include previous variable definitions in REPL links --- docs/doc/range.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/doc/range.html') diff --git a/docs/doc/range.html b/docs/doc/range.html index 887f9833..52bbc54d 100644 --- a/docs/doc/range.html +++ b/docs/doc/range.html @@ -86,14 +86,14 @@ ⟨ 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 `.

-↗️
    ` b × ↕≠b
+↗️
    ` b × ↕≠b
 ⟨ 0 1 2 2 2 2 6 6 ⟩
 
     (`  × ) b   # As a tacit function
 ⟨ 0 1 2 2 2 2 6 6 ⟩
 

Where there aren't any previous 1s, this returns an index of 0, which is the same as the result where there is a 1 at index 0. If it's important to distinguish these possibilities, the indices can be increased by one, so that the result is 0 if there are no 1s, and 1 for a 1 at the start. To bring it back into alignment with the argument, either this result can be decreased by 1 or an initial element can be added to the argument.

-↗️
    ` b × 1 + ↕≠b
+↗️
    ` b × 1 + ↕≠b
 ⟨ 0 2 3 3 3 3 7 7 ⟩
 

List range

-- cgit v1.2.3