aboutsummaryrefslogtreecommitdiff
path: root/doc/replicate.md
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-06 21:29:06 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-06 21:29:06 -0400
commit8342ba5e9392811dbc0514a97e847a44a5b330a2 (patch)
treef606422844d6a5df93b5bdd799b9daf4634b3145 /doc/replicate.md
parent272464e78e1f44bca037868ce83092856f42995e (diff)
When I wrote all these docs did I really understand I'd have to edit them?
Diffstat (limited to 'doc/replicate.md')
-rw-r--r--doc/replicate.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/replicate.md b/doc/replicate.md
index 66905116..47ae1eea 100644
--- a/doc/replicate.md
+++ b/doc/replicate.md
@@ -43,7 +43,7 @@ BQN doesn't have any of the various features used in APL to add fills to the res
## Replicate
-Given a list of natural numbers `𝕨`, Replicate repeats each major cell in `𝕩` the corresponding number of times. That is, `𝕨` and `𝕩` must have the same length, and the result includes `iβŠ‘π•¨` copies of each cell `iβŠπ•©`, in order.
+Given a list of natural numbers `𝕨`, Replicate repeats each [major cell](array.md#cells) in `𝕩` the corresponding number of times. That is, `𝕨` and `𝕩` must have the same length, and the result includes `iβŠ‘π•¨` copies of each cell `iβŠπ•©`, in order.
2β€Ώ1β€Ώ0β€Ώ2 / "abcd"
@@ -65,7 +65,7 @@ When `𝕨` is a list of booleans, a cell is never repeated more than once, mean
Here `β‰€βŸœ'i'` is a pervasive function, so there's no need to add `Β¨`. Similarly, to filter major cells of an array, `Fn˘⊸/` could be used, applying `Fn` to one major cell at a time.
-A similar pattern applies to Replicate as well. The function below tests which input characters are double quotes, but by adding one it changes the result to 1 for each non-quote character and 2 for quotes (but source code and display also double quotes here, so the input string has only two `"`s and the output has four).
+This idea extends to Replicate as well. The function below tests which input characters are double quotes, but by adding one it changes the result to 1 for each non-quote character and 2 for quotes (but source code and display also double quotes here, so the input string has only two `"`s and the output has four).
{1+'"'=𝕩}⊸/ "for ""escaping"" quotes"
@@ -95,7 +95,7 @@ If `𝕨` is `⟨⟩`, then it has depth 1, but is handled with the multidimensi
## Indices
-The monadic form of `/` is much simpler than the dyadic one, with no multidimensional case or mismatched argument ranks. `𝕩` must be a list of natural numbers, and `/𝕩` is the list `𝕩/↕≠𝕩`. Its elements are the [indices](indices.md) for `𝕩`, with index `i` repeated `iβŠ‘π•©` times.
+The monadic form of `/` is much simpler than the dyadic one, with no multidimensional case or mismatched argument ranks. `𝕩` has to be a list of natural numbers, and `/𝕩` is the list `𝕩/↕≠𝕩`. Its elements are the [indices](indices.md) for `𝕩`, with index `i` repeated `iβŠ‘π•©` times.
/ 3β€Ώ0β€Ώ1β€Ώ2
@@ -125,7 +125,7 @@ So now we have the indices of each transition from 0 to 1 or 1 to 0, in an exten
-˜`˘ βˆ˜β€Ώ2β₯Š/ 0(βˆΎβ‰ βˆΎΛœ) 0β€Ώ1β€Ώ1β€Ώ1β€Ώ0β€Ώ0β€Ώ1β€Ώ0β€Ώ1β€Ώ1β€Ώ0
-This means the transitions can be grouped exactly in pairs, the beginning and end of each group. Reshape with a [computed length](reshape.md#computed-lengths) `βˆ˜β€Ώ2` groups these pairs, and then a scan ``-˜`˘`` can be used to convert the start/end format to start/length if wanted.
+This means the transitions can be grouped exactly in pairs, the beginning and end of each group. Reshape with a [computed length](reshape.md#computed-lengths) `βˆ˜β€Ώ2` groups these pairs, and then a [scan](scan.md) ``-˜`˘`` can be used to convert the start/end format to start/length if wanted.
### Inverse