From 0d6c26b9aa607ff14e14e6488bace207e324022a Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 13 Jun 2022 13:20:34 -0400 Subject: =?UTF-8?q?Highlight=20[]=20as=20list=20brackets,=20like=20?= =?UTF-8?q?=E2=9F=A8=E2=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/doc/array.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/doc/array.html') diff --git a/docs/doc/array.html b/docs/doc/array.html index ec4eab33..827f05c0 100644 --- a/docs/doc/array.html +++ b/docs/doc/array.html @@ -6,7 +6,7 @@

The array

As BQN is an array language, it's often helpful to understand what an array is when writing BQN programs. Fully describing the concept is sometimes held to be tricky; here we'll see definitions, examples, and metaphors.

-

In BQN, as in APL, arrays are multidimensional, instead of strictly linear. Languages like Python, Javascript, or Haskell offer only one-dimensional arrays with [] syntax, and typically represent multidimensional data with nested arrays. Multidimensional arrays have fundamental differences relative to this model.

+

In BQN, as in APL, arrays are multidimensional, instead of strictly linear. Languages like Python, Javascript, or Haskell offer only one-dimensional arrays with [] syntax, and typically represent multidimensional data with nested arrays. Multidimensional arrays have fundamental differences relative to this model.

BQN's arrays are immutable, meaning that an array is entirely defined by its attributes, and there is no way to modify an existing array, only to produce another array that has changes relative to it. As a result, an array can never contain itself, and arrays form an inductive type. BQN's mutable types are operations and namespaces.

An array might also have a fill element that captures some structural information about its elements and is used by a few operations. The fill, as an inferred property, isn't considered to truly be part of the array but is instead some information about the array that the interpreter keeps track of. So it's out of scope here.

-- cgit v1.2.3