Node:Sequences, Next:Atoms, Previous:Mappings, Up:Top
A sequence is a finite or infinite list of objects. The objects are numbered starting with 0.
There are a number of different kinds of sequence, but these are considered to be different ways of implementing the same abstract sequence type.
Higher-order arrays are considered to be sequences of sequences. (But ...)
A vector can be constructed with the []
constructor:
Q2> [[2 3 4] [5 6 7 4+4]] 2 3 4 5 6 7 8
Indexing uses an implicit "adjacency" operator, just like function calls:
Q1> [3 4 5] 2 5
size seq | Function |
Returns the number of elements in seq: size [3 4 5] is 3.
|
seq length | Function |
Returns the number of elements in seq: [3 4 5] length is 3.
|
Q vector N | Function |
Allocate an updatable fixed-length vector of length N.
Initialize the elements using the sequence Q.
Default value for N is the Q length .
|