aboutsummaryrefslogtreecommitdiffstats
path: root/docs/reference/05-1_arrays.md
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2025-03-18 11:47:22 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-18 12:06:18 +0000
commitb6cbc69461dc054019f50f8971704f6ef9de63ab (patch)
treed2b8942b780f668ccbe57b52dd8d65f61613e935 /docs/reference/05-1_arrays.md
parentbuiltins: switch takes single array as value (diff)
downloadalive-wip.tar.gz
alive-wip.zip
language: [array] and {struct} literalswip
Diffstat (limited to 'docs/reference/05-1_arrays.md')
-rw-r--r--docs/reference/05-1_arrays.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/reference/05-1_arrays.md b/docs/reference/05-1_arrays.md
index fdd26ff..19075f5 100644
--- a/docs/reference/05-1_arrays.md
+++ b/docs/reference/05-1_arrays.md
@@ -1,9 +1,11 @@
Arrays are composite types that contain a fixed number of values of the same
-type. Arrays values can be created using the [`(array …)`][:array:] builtin,
-which uses [Pure Op](04-2_pure-operators.html) semantics to construct an array
-from its parameters, all of which have to be of the same type.
+type. Arrays values can be created using square brackets `[1 2 3]` (which is
+syntactic sugar for the [`(mkarray …)`][:mkarray:] builtin).
- (trace (array 1 2 3))
+This uses [Pure Op](04-2_pure-operators.html) semantics to construct an array
+from several values, all of which have to be of the same type.
+
+ (trace [1 2 3])
```output
<num[3]= [1 2 3]>
```
@@ -11,4 +13,4 @@ from its parameters, all of which have to be of the same type.
The type notation `num[3]` designates an array of three numbers, whereas the
value notation `[1 2 3]` is used to show the array contents.
-The [array-][:array-/:] module provides *Op*s for working with arrays.
+The [array][:array/:] module provides *Op*s for working with arrays.