aboutsummaryrefslogtreecommitdiff
path: root/doc/windows.md
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-21 19:48:24 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-21 19:48:24 -0400
commit93f75e97685520cdad3afab0134e2f65e5e211e2 (patch)
tree790c97ead26f8417b199922136f69397c703ddad /doc/windows.md
parentb3ecbb5695a5a0a0637c924da0022abca940ffee (diff)
Add Insert (˝) 1-modifier
Diffstat (limited to 'doc/windows.md')
-rw-r--r--doc/windows.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/windows.md b/doc/windows.md
index a60e1ae0..2f1eda55 100644
--- a/doc/windows.md
+++ b/doc/windows.md
@@ -68,8 +68,8 @@ Windows can be followed up with a reduction on each slice to give a windowed red
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.
-˜´˘2↕0∾ +` 3‿2‿1‿1
- ((-˜´<˘)≠↕0∾⊢) +` 3‿2‿1‿1
+ (-˜˝≠↕0∾⊢) +` 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.
- ((+´<˘)≠↕(2⥊0)⊸∾) ⟨2,6,0,1,4,3⟩
+ (+˝≠↕(2⥊0)⊸∾) ⟨2,6,0,1,4,3⟩