From 65eef4fade5eb426dae01d480f383b8a30b23071 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 11 Aug 2021 14:06:02 -0400 Subject: Change "BQN / main" in header to "(github) / BQN" --- docs/doc/indices.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/doc/indices.html') diff --git a/docs/doc/indices.html b/docs/doc/indices.html index 5a0836d9..fe67492d 100644 --- a/docs/doc/indices.html +++ b/docs/doc/indices.html @@ -3,7 +3,7 @@ BQN: Indices - +

Indices

One-dimensional arrays such as K lists or Python arrays have only one kind of index, a single number that refers to an element. For multidimensional arrays using the leading axis theory, there are several types of indexing that can be useful. Historically, nested APL designs have equivocated between these, which I believe can lead to subtle errors when programming. BQN focuses on single-number (atomic) indices, which can refer to list elements or array major cells (or more generally indexing along any particular axis). When using atomic indices to select elements, the indexed array has to be a list. In contrast, elements of any array can be indicated by list indices with length equal to that array's rank. Only two BQN primitives use these list indices: Range (), which returns an array of them if given a list argument, and Pick (), where the depth-1 components of an array left argument are list indices.

The following functions take or return indices. Except where marked, the indices are in the result; this is by far the most common type of index use. Group () is given two rows as it falls into both cases. Note that in the result case, there is usually no possibility for the programmer to select the format of indices. Instead, the language should be carefully designed to make sure that the kind of index returned is as useful as possible.

-- cgit v1.2.3