5.1. arrays

Arrays are composite types that contain a fixed number of values of the same type. Arrays values can be created using square brackets [1 2 3] (which is syntactic sugar for the (mkarray …) builtin).

This uses Pure Op semantics to construct an array from several values, all of which have to be of the same type.

(trace [1 2 3])
<num[3]= [1 2 3]>

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 module provides Ops for working with arrays.