From 93f75e97685520cdad3afab0134e2f65e5e211e2 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 21 Jul 2020 19:48:24 -0400 Subject: =?UTF-8?q?Add=20Insert=20(=CB=9D)=201-modifier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/doc/windows.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/doc/windows.html') diff --git a/docs/doc/windows.html b/docs/doc/windows.html index c20d6591..113d5ffd 100644 --- a/docs/doc/windows.html +++ b/docs/doc/windows.html @@ -81,11 +81,11 @@

A common task is to pair elements, with an initial or final element so the total length stays the same. This can also be done with a pairwise reduction, but another good way (and more performant without special support in the interpreter) is to add the element and then use windows matching the original length. Here both methods are used to invert +`, which requires we take pairwise differences starting at initial value 0.

    -˜´˘20 +` 3211
 ⟨ 3 2 1 1 ⟩
-    ((-˜´<˘)≠↕0∾⊢) +` 3211
+    (-˜˝≠↕0∾⊢) +` 3211
 ⟨ 3 2 1 1 ⟩
 

This method extends to any number of initial elements. We can modify the running sum above to keep the length constant by starting with two zeros.

-
    ((+´<˘)≠↕(20)) 2,6,0,1,4,3
+
    (+˝≠↕(20)) 2,6,0,1,4,3
 ⟨ 2 8 8 7 5 8 ⟩
 
-- cgit v1.2.3