Macaulay2 » Documentation
Packages » VisibleList > Array
next | previous | forward | backward | up | index | toc

Array -- the class of all arrays -- [...]

Description

An array can be created by enclosing elements of any type in brackets.

i1 : x = [a,b,c]

o1 = [a, b, c]

o1 : Array
i2 : # x

o2 = 3
i3 : x#1

o3 = b

o3 : Symbol

To convert arrays to and from other types of BasicList, one may use new.

i4 : new Array from {a,b,c}

o4 = [a, b, c]

o4 : Array
i5 : new Sequence from [a,b,c]

o5 = (a, b, c)

o5 : Sequence

For an overview of lists and sequences, see lists and sequences.

Functions and methods returning an array :

Methods that use an array :

For the programmer

The object Array is a type, with ancestor classes VisibleList < BasicList < Thing.