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

## Description

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

To convert sequences to and from other types of BasicList, in addition to toSequence, 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.

## Methods that use a sequence :

• "Sequence <- Thing" -- see <- -- assignment with left side evaluated
• "Sequence == Sequence" -- see == -- equality
• "chainComplex(Sequence)" -- see chainComplex(List) -- make a chain complex
• "code(Sequence)" -- see code -- display source code
• CoherentSheaf Sequence (missing documentation)
• "directSum(Sequence)" -- see directSum -- direct sum of modules or maps
• "frames(Sequence)" -- see frames -- get the frames associated to a closure
• "gcd(Sequence)" -- see gcd -- greatest common divisor
• "HeaderType Sequence" -- see HeaderType -- a class of lists with abbreviated constructors
• "help(Sequence)" -- see help -- view documentation nodes
• "hh(Sequence,ProjectiveVariety)" -- see hh -- Hodge numbers of a smooth projective variety
• HH_ZZ Sequence (missing documentation)
• "hooks(Sequence)" -- see hooks -- list hooks attached to a key
• "hypertext(Sequence)" -- see hypertext -- prepare hypertext for display
• "ideal(Sequence)" -- see ideal(List) -- make an ideal
• "intersect(Sequence)" -- see intersect -- compute an intersection
• "lcm(Sequence)" -- see lcm -- least common multiple
• "makePackageIndex(Sequence)" -- see makePackageIndex -- create an index of installed packages
• Matrix _ Sequence -- get entry of matrix
• "MutableMatrix _ Sequence" -- see Matrix _ Sequence -- get entry of matrix
• "methods(Sequence)" -- see methods -- list methods
• "Module / Sequence" -- see Module / Module -- quotient module
• "monomialIdeal(Sequence)" -- see monomialIdeal(Matrix) -- monomial ideal of lead monomials
• MutableMatrix _ Sequence = Thing -- assignment to an element of a mutable matrix
• new TestInput from Sequence (missing documentation)
• "options(Sequence)" -- see options(Command) -- get optional arguments and default values of functions and methods
• "package(Sequence)" -- see package -- get containing package
• "Ring / Sequence" -- see Ring / Ideal -- make a quotient ring
• "runHooks(Sequence,Thing)" -- see runHooks -- run the hook functions stored in an object
• "setRandomSeed(Sequence)" -- see setRandomSeed -- set starting point for random number generator
• SheafOfRings Sequence (missing documentation)
• span(Sequence) -- construct smallest interval
• String ^ Sequence -- vertically stacked copies of a string
• String _ Sequence -- substring
• "submatrixByDegrees(Matrix,Sequence,Sequence)" -- see submatrixByDegrees -- submatrix consisting of rows and columns in an interval or box of degrees
• "subsets(Sequence,ZZ)" -- see subsets -- produce the subsets of a set or list
• "substring(Sequence,String)" -- see substring -- extract part of a string
• "SYNOPSIS(Sequence)" -- see SYNOPSIS -- a standardized synopsis for use in documentation nodes
• "tensor(Sequence)" -- see tensor -- tensor product
• texMath(Sequence) (missing documentation)
• "unique(Sequence)" -- see unique -- eliminate duplicates from a list
• "vars(Sequence)" -- see vars(List) -- a sequence of variables
• "WrapperType Sequence" -- see WrapperType -- a class of lists with abbreviated constructors

## For the programmer

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