From a987a3ab0f4f3c873be75450a85e26a5c29ff0e3 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 16 Oct 2021 19:03:39 -0400 Subject: Use svg diagram instead of table for types in the list tutorial --- docs/tutorial/list.html | 93 +++++++++++++++++++++++++------------------------ tutorial/list.md | 36 +++++++++++++++---- 2 files changed, 77 insertions(+), 52 deletions(-) diff --git a/docs/tutorial/list.html b/docs/tutorial/list.html index 0e032b98..71eb8a5f 100644 --- a/docs/tutorial/list.html +++ b/docs/tutorial/list.html @@ -87,29 +87,30 @@ ⟨ 0 ⟨ 1 2 ⟩ ⟩

BQN types

-

Now that all six BQN types have been introduced, let's make a table:

- - - - - - - - - - - - - - - - - - - - - -
DataOperation
NumberFunction
Character1-modifier
Array2-modifier
+

Now that six of the seven BQN types have been introduced, let's make a diagram:

+ + + + + + + + + Number + Function + Character + 1-modifier + Array + 2-modifier + + + Data + Operation + Atom + + + +

Lists are just one-dimensional arrays. Types are divided into data types, which tend to have a subject role, and operation types, which tend to have a role matching their type. Also, any value that's not an array, such as everything we used in the last tutorial, is called an atom.

Arithmetic on lists

Arithmetic functions automatically apply to each element of a list argument. If both arguments are lists, they have to have the same length, and they're matched up one element at a time.

@@ -280,7 +281,7 @@

Lot of functions up there. Notice how I need to use parentheses for the left argument of a function if it's compound, but never for the right argument, and consequently never with a one-argument function.

- + +´ (24) × "1001"-'0' @@ -296,30 +297,30 @@ - '0' - - - "1001" - × - 4 - - - 2 - - ´ - + + '0' + - + "1001" + × + 4 + + + 2 + + ´ + + - '0' - - - "1001" - × - 4 - - - 2 - - ´ - + + '0' + - + "1001" + × + 4 + + + 2 + + ´ + + diff --git a/tutorial/list.md b/tutorial/list.md index c9fbb0d2..995a81c5 100644 --- a/tutorial/list.md +++ b/tutorial/list.md @@ -56,13 +56,37 @@ An individual ligature part of BQN syntax, not a value, and it doesn't do someth ## BQN types -Now that all six BQN types have been introduced, let's make a table: +Now that six of the seven BQN types have been introduced, let's make a diagram: -Data | Operation -:--------:|:---------: -Number | Function -Character | 1-modifier -Array | 2-modifier + Lists are just one-dimensional arrays. Types are divided into *data types*, which tend to have a subject role, and *operation types*, which tend to have a role matching their type. Also, any value that's not an array, such as everything we used in the last tutorial, is called an *atom*. -- cgit v1.2.3