next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > The Macaulay2 language > lists and sequences > VisibleList > Sequence

Sequence -- the class of all sequences -- (...)

Description

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

A sequence is an ordered collection of things enclosed by parentheses and separated by commas. Use # to get the length of a sequence of to get one of the elements.
i1 : v = (a,b,c)

o1 = (a, b, c)

o1 : Sequence
i2 : #v

o2 = 3
i3 : v#2

o3 = c

o3 : Symbol

See also

Functions and methods returning a sequence :

Methods that use a sequence :

For the programmer

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