From 8659fe5eb829b912b21c5ef604d8a7f36a74ee28 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 3 Aug 2021 17:08:58 -0400 Subject: Some links to undo.md --- doc/couple.md | 2 +- doc/replicate.md | 2 +- doc/reverse.md | 2 +- doc/shift.md | 2 +- docs/doc/couple.html | 2 +- docs/doc/replicate.html | 2 +- docs/doc/reverse.html | 2 +- docs/doc/shift.html | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/couple.md b/doc/couple.md index e88acb75..4603b22b 100644 --- a/doc/couple.md +++ b/doc/couple.md @@ -30,7 +30,7 @@ In all cases what these functions do is more like reinterpreting existing data t ⥊ ⥊¨ a ∾ ⥊ ⥊¨ a -The way this happens, and the constraint that all inner arrays have the same shape, is closely connected to the concept of an array, and like [Table](map.md#table) `⌜`, Merge might be considered a fundamental way to build up multidimensional arrays from lists. In both cases rank-0 or [unit](enclose.md#whats-a-unit) arrays are somewhat special. They are the [identity value](fold.md#identity-values) of a function with Table, and can be produced by Merge inverse, `>⁼` **on a list**, which forces either the outer or inner shape to be empty (BQN chooses `>⁼` to be `<`, but only on an array, as `>` cannot produce non-arrays). Merge has another catch as well: it cannot produce arrays with a `0` in the shape, except at the end, unless fills can be specified. +The way this happens, and the constraint that all inner arrays have the same shape, is closely connected to the concept of an array, and like [Table](map.md#table) `⌜`, Merge might be considered a fundamental way to build up multidimensional arrays from lists. In both cases rank-0 or [unit](enclose.md#whats-a-unit) arrays are somewhat special. They are the [identity value](fold.md#identity-values) of a function with Table, and can be produced by Merge [inverse](undo.md), `>⁼` **on a list**, which forces either the outer or inner shape to be empty (BQN chooses `>⁼` to be `<`, but only on an array, as `>` cannot produce non-arrays). Merge has another catch as well: it cannot produce arrays with a `0` in the shape, except at the end, unless fills can be specified. ⊢ e ← ⟨⟩¨ ↕3 ≢ > e diff --git a/doc/replicate.md b/doc/replicate.md index 29ecbaae..6b1dae8c 100644 --- a/doc/replicate.md +++ b/doc/replicate.md @@ -129,7 +129,7 @@ This means the transitions can be grouped exactly in pairs, the beginning and en ### Inverse -The result of Indices `/n` is an ordered list of natural numbers, where the number `i` appears `i⊑n` times. Given an ordered list of natural numbers `k`, the *inverse* of indices returns a corresponding `n`: one where the value `i⊑n` is the number of times `i` appears in `k`. +The result of Indices `/n` is an ordered list of natural numbers, where the number `i` appears `i⊑n` times. Given an ordered list of natural numbers `k`, the [*inverse*](undo.md) of indices returns a corresponding `n`: one where the value `i⊑n` is the number of times `i` appears in `k`. / 3‿2‿1 diff --git a/doc/reverse.md b/doc/reverse.md index e1e85d46..5a1e2f37 100644 --- a/doc/reverse.md +++ b/doc/reverse.md @@ -28,7 +28,7 @@ Reverse is useful for [folding](fold.md) left to right instead of right to left. ≍○<˜´ ⌽ "abcd" # Left to right -Reverse is its own inverse `⌽⁼`. As a result, `𝔽⌾⌽` reverses the argument, applies `𝔽`, and reverses again. It's a particularly useful pattern with [Scan](scan.md), as it allows scanning from the end rather than the beginning of the array. For example, `` ∨` `` on a list of booleans changes all bits after the first `1` to `1`, but `` ∨`⌾⌽ `` does this to all bits before the last `1`. +Reverse is its own [inverse](undo.md) `⌽⁼`. As a result, `𝔽⌾⌽` reverses the argument, applies `𝔽`, and reverses again. It's a particularly useful pattern with [Scan](scan.md), as it allows scanning from the end rather than the beginning of the array. For example, `` ∨` `` on a list of booleans changes all bits after the first `1` to `1`, but `` ∨`⌾⌽ `` does this to all bits before the last `1`. ∨` 0‿0‿1‿0‿0‿1‿0 diff --git a/doc/shift.md b/doc/shift.md index cc582fae..bd51edce 100644 --- a/doc/shift.md +++ b/doc/shift.md @@ -18,7 +18,7 @@ If `𝕨` is longer than `𝕩`, some cells from `𝕨` will be discarded, as we ## Sequence processing with shifts -When working with a sequence of data such as text, daily measurements, or audio data, shift functions are generally the best way to handle the concept of "next" or "previous". In the following example `s` is shown alongside the shifted-right data `»s`, and each element is compared to the previous with `-⟜»`, which we see is the inverse of Plus [Scan](scan.md) `` +` ``. +When working with a sequence of data such as text, daily measurements, or audio data, shift functions are generally the best way to handle the concept of "next" or "previous". In the following example `s` is shown alongside the shifted-right data `»s`, and each element is compared to the previous with `-⟜»`, which we see is the [inverse](undo.md) of Plus [Scan](scan.md) `` +` ``. s ← 1‿2‿2‿4‿3‿5‿6 s ≍ »s diff --git a/docs/doc/couple.html b/docs/doc/couple.html index 1e55a233..164c0fd5 100644 --- a/docs/doc/couple.html +++ b/docs/doc/couple.html @@ -65,7 +65,7 @@ ¨ a "ABrstABuvwABxyzCDrstCDuvwCDxyz" -

The way this happens, and the constraint that all inner arrays have the same shape, is closely connected to the concept of an array, and like Table , Merge might be considered a fundamental way to build up multidimensional arrays from lists. In both cases rank-0 or unit arrays are somewhat special. They are the identity value of a function with Table, and can be produced by Merge inverse, > on a list, which forces either the outer or inner shape to be empty (BQN chooses > to be <, but only on an array, as > cannot produce non-arrays). Merge has another catch as well: it cannot produce arrays with a 0 in the shape, except at the end, unless fills can be specified.

+

The way this happens, and the constraint that all inner arrays have the same shape, is closely connected to the concept of an array, and like Table , Merge might be considered a fundamental way to build up multidimensional arrays from lists. In both cases rank-0 or unit arrays are somewhat special. They are the identity value of a function with Table, and can be produced by Merge inverse, > on a list, which forces either the outer or inner shape to be empty (BQN chooses > to be <, but only on an array, as > cannot produce non-arrays). Merge has another catch as well: it cannot produce arrays with a 0 in the shape, except at the end, unless fills can be specified.

↗️
     e  ⟨⟩¨ 3
 ⟨ ⟨⟩ ⟨⟩ ⟨⟩ ⟩
      > e
diff --git a/docs/doc/replicate.html b/docs/doc/replicate.html
index 746062ea..31e76b28 100644
--- a/docs/doc/replicate.html
+++ b/docs/doc/replicate.html
@@ -213,7 +213,7 @@
 

This means the transitions can be grouped exactly in pairs, the beginning and end of each group. Reshape with a computed length 2 groups these pairs, and then a scan -˜`˘ can be used to convert the start/end format to start/length if wanted.

Inverse

-

The result of Indices /n is an ordered list of natural numbers, where the number i appears in times. Given an ordered list of natural numbers k, the inverse of indices returns a corresponding n: one where the value in is the number of times i appears in k.

+

The result of Indices /n is an ordered list of natural numbers, where the number i appears in times. Given an ordered list of natural numbers k, the inverse of indices returns a corresponding n: one where the value in is the number of times i appears in k.

↗️
    / 321
 ⟨ 0 0 0 1 1 2 ⟩
 
diff --git a/docs/doc/reverse.html b/docs/doc/reverse.html
index 62eae902..4fc5165a 100644
--- a/docs/doc/reverse.html
+++ b/docs/doc/reverse.html
@@ -38,7 +38,7 @@
     <˜´  "abcd"  # Left to right
 ⟨ ⟨ "ab" 'c' ⟩ 'd' ⟩
 
-

Reverse is its own inverse . As a result, 𝔽 reverses the argument, applies 𝔽, and reverses again. It's a particularly useful pattern with Scan, as it allows scanning from the end rather than the beginning of the array. For example, ` on a list of booleans changes all bits after the first 1 to 1, but ` does this to all bits before the last 1.

+

Reverse is its own inverse . As a result, 𝔽 reverses the argument, applies 𝔽, and reverses again. It's a particularly useful pattern with Scan, as it allows scanning from the end rather than the beginning of the array. For example, ` on a list of booleans changes all bits after the first 1 to 1, but ` does this to all bits before the last 1.

↗️
    `   0010010
 ⟨ 0 0 1 1 1 1 1 ⟩
 
diff --git a/docs/doc/shift.html b/docs/doc/shift.html
index a85fce92..ecee0d5c 100644
--- a/docs/doc/shift.html
+++ b/docs/doc/shift.html
@@ -20,7 +20,7 @@
 

If 𝕨 is longer than 𝕩, some cells from 𝕨 will be discarded, as well as all of 𝕩. In this case 𝕨»𝕩 is (𝕩)𝕨 and 𝕨«𝕩 is (-≠𝕩)𝕨. For similar reasons, nudging an array of length 0 returns it unchanged.

Sequence processing with shifts

-

When working with a sequence of data such as text, daily measurements, or audio data, shift functions are generally the best way to handle the concept of "next" or "previous". In the following example s is shown alongside the shifted-right data »s, and each element is compared to the previous with -», which we see is the inverse of Plus Scan +`.

+

When working with a sequence of data such as text, daily measurements, or audio data, shift functions are generally the best way to handle the concept of "next" or "previous". In the following example s is shown alongside the shifted-right data »s, and each element is compared to the previous with -», which we see is the inverse of Plus Scan +`.

↗️
    s  1224356
     s  »s
 ┌─               
-- 
cgit v1.2.3