array


array(obj1, @rest...)
      

Return an array with the objects obj1, ... as elements.

Arrays are fixed-length sequences that provide constant-time, position-based lookup for elements.

An array literal looks similar to a list literal, except that the opening bracket is preceded by a hash (#) character. For example, an array consisting of the elements 1, 2, and 3 will be written as #[1, 2, 3].

Examples:


let a = array(1, 2, 3)
a          
// #[1, 2, 3]
a[0]
// 1
a[1] = 100
a
// #[1, 100, 3]
      

Also see:

make_array
array_at
array_set


Core Module Index | Contents