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/group.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/doc/group.html') diff --git a/docs/doc/group.html b/docs/doc/group.html index d9b16bb2..b2227519 100644 --- a/docs/doc/group.html +++ b/docs/doc/group.html @@ -76,7 +76,7 @@

(Could we define phrase more easily? See below.)

If we'd like to ignore words of 0 letters, or more than 5, we can set all word lengths greater than 5 to 0, then reduce the lengths by 1. Two words end up with left argument values of ¯1 and are omitted from the result.

-↗️
    1 -˜ 5× ¨ phrase
+↗️
    1 -˜ 5× ¨ phrase
 ⟨ 2 3 ¯1 1 0 3 1 ¯1 ⟩
 
     ˘ {1-˜5×≠¨𝕩} phrase
@@ -88,7 +88,7 @@
                     ┘
 

Note that the length of the result is determined by the largest index. So the result never includes trailing empty groups. A reader of the above code might expect 5 groups (lengths 1 through 5), but there are no words of length 5, so the last group isn't there. To ensure the result always has 5 groups, we can add a 5 at the end of the left argument.

-↗️
    ˘ {5˜1-˜5×≠¨𝕩} phrase
+↗️
    ˘ {5˜1-˜5×≠¨𝕩} phrase
 ┌─                   
 ╵ ⟨ "a" ⟩            
   ⟨ "as" "of" ⟩      
@@ -137,7 +137,7 @@
                              ┘
 

If we would like a particular index to key correspondence, we can use a fixed left argument to Index Of.

-↗️
    countries  "IT""JP""NO""SU""US"
+↗️
    countries  "IT""JP""NO""SU""US"
     countries ˘ co countries ln
 ┌─                                 
 ╵ "IT" ⟨⟩                          
@@ -148,7 +148,7 @@
                                   ┘
 

However, this solution will fail if there are trailing keys with no values. To force the result to have a particular length you can append that length to the left argument.

-↗️
    countries  "IT""JP""NO""SU""US""ZW"
+↗️
    countries  "IT""JP""NO""SU""US""ZW"
     countries ˘ co countries(⊐∾≠) ln
 ┌─                                 
 ╵ "IT" ⟨⟩                          
-- 
cgit v1.2.3