From c3ea468236e362e4ecc1bc27aed7a64d90e7cf81 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 2 Jun 2022 21:42:44 -0400 Subject: Always use "index list", not "list index", for a full element index --- doc/range.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/range.md') diff --git a/doc/range.md b/doc/range.md index 60e1afbb..40464bbf 100644 --- a/doc/range.md +++ b/doc/range.md @@ -8,7 +8,7 @@ Range (`↕`) is a monadic function that creates arrays of [indices](indices.md) ↕ 2‿3 -It's really two different functions packed together: if `𝕩` is a natural number—a length—then it returns a list of numeric indices, but if it's a list of numbers, then it returns an array of list indices. This means the result always has [depth](depth.md) one more than the argument. +It's really two different functions packed together: if `𝕩` is a natural number—a length—then it returns a list of numeric indices, but if it's a list of numbers, then it returns an array of index lists. This means the result always has [depth](depth.md) one more than the argument. The two kinds of index correspond to BQN's two selection functions: [Select](select.md) (`⊏`) works with indices along an axis, which are numbers, and [Pick](pick.md) (`⊑`) works with element indices, which are lists. The examples below would fail if we swapped these around. Each result from Range is a length-6 list, but their elements are different. -- cgit v1.2.3