Vectors

A vector or array is a collection of elements that can be accessed by an integer index. Usually all elements of a vector have the same type, although in Lisp they can have different types.

An array has two advantages over a linked list:

Arrays are less flexible in terms of modifying the structure of the array (for example, inserting an element in the middle) and for making compound structures.

In Lisp, pointers to values are stored in the array; in most languages, the values are stored in the array.

Contents    Page-10    Prev    Next    Page+10    Index