diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-07-23 13:01:58 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-07-23 13:01:58 -0400 |
| commit | 7dd7230cdd4b725a6837a195752831594080b2a9 (patch) | |
| tree | d70ff59d2d1a322f53aad32ed968fc699793cf70 | |
| parent | f42eaf48b8db00eaba45a47494d7708030379190 (diff) | |
No need for Each to get scalar function leading axis agreement any more
| -rw-r--r-- | doc/leading.md | 4 | ||||
| -rw-r--r-- | docs/doc/leading.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/leading.md b/doc/leading.md index 2901baea..95fde0fa 100644 --- a/doc/leading.md +++ b/doc/leading.md @@ -85,9 +85,9 @@ Functions with single-axis depth 1 tend to be more complicated; see for example Scalar functions, and the Each (`¨`) and Depth (`⚇`) modifiers, use leading axis agreement to match their arguments together. All axes of the lower-rank argument are matched with the leading axes of the higher-rank one, and axes matched together must have the same length. After pairing axes in this way, a single element of the lower-rank argument might correspond to any number of elements of the higher-rank one. It's reused for each of those corresponding elements. ⊢ x ← 3‿2‿4 ⥊ ↕60 # A rank-3 array - 100‿0‿200 +¨ x # 0-cells paired with 2-cells + 100‿0‿200 + x # 0-cells paired with 2-cells ⊢ c ← 100 × 3 =⌜○↕ 2 # A rank-2 array to add - c +¨ x # 0-cells paired with 1-cells + c + x # 0-cells paired with 1-cells x + x # Pairwise addition If one argument is a scalar, that is, it has no axes, then leading axis agreement reduces to "scalar extension", where a single scalar is matched with an entire array by repeating it at every application. A scalar always agrees with any other array under leading axis agreement because it has no axes whose lengths would need to be checked. diff --git a/docs/doc/leading.html b/docs/doc/leading.html index fba0d4c4..0301ddd4 100644 --- a/docs/doc/leading.html +++ b/docs/doc/leading.html @@ -154,7 +154,7 @@ 16 17 18 19 20 21 22 23 ┘ - <span class='Number'>100</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>200</span> <span class='Function'>+</span><span class='Modifier'>¨</span> <span class='Value'>x</span> <span class='Comment'># 0-cells paired with 2-cells + <span class='Number'>100</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>200</span> <span class='Function'>+</span> <span class='Value'>x</span> <span class='Comment'># 0-cells paired with 2-cells </span>┌─ ╎ 100 101 102 103 104 105 106 107 @@ -171,7 +171,7 @@ 0 100 0 0 ┘ - <span class='Value'>c</span> <span class='Function'>+</span><span class='Modifier'>¨</span> <span class='Value'>x</span> <span class='Comment'># 0-cells paired with 1-cells + <span class='Value'>c</span> <span class='Function'>+</span> <span class='Value'>x</span> <span class='Comment'># 0-cells paired with 1-cells </span>┌─ ╎ 100 101 102 103 4 5 6 7 |
