Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » VisibleList » Sequence
next | previous | forward | backward | up | index | toc

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.

Functions and methods returning a sequence:

Methods that use a sequence:

  • # Sequence -- see # List -- length or cardinality of a list, hash table, dictionary, set, or string
  • Sequence #? ZZ -- see #? -- check existence of value in a list, hash table, database, or string
  • Sequence <- Thing -- see <- -- assignment with left side evaluated
  • addHook(Sequence,Function) -- see addHook -- add a hook function to an object for later processing
  • basis(Sequence,RingMap) -- see basis -- basis or generating set of all or part of a ring, ideal or module
  • code(Sequence) -- see code -- display source code
  • directProduct(Sequence) -- see directProduct -- direct product
  • 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
  • gradedModule(Sequence)
  • HeaderType Sequence -- see HeaderType -- a class of lists with abbreviated constructors
  • help(Sequence) -- see help -- view documentation nodes
  • HH_ZZ Sequence (missing documentation)
  • hooks(Sequence) -- see hooks -- list hooks attached to a key
  • ideal(Sequence) -- see ideal(List) -- make an ideal
  • intersect(Sequence) -- see intersect -- compute an intersection
  • lcm(Sequence) -- see lcm -- least common multiple
  • Sequence # ZZ -- see List # ZZ -- get value from list, hash table, database, dictionary, or string
  • localDictionaries(Sequence) (missing documentation)
  • locate(Sequence) -- see locate -- locate source code
  • 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
  • MultigradedBettiTally Sequence -- see MultigradedBettiTally -- the class of all multigraded Betti tallies
  • MutableMatrix _ Sequence = Thing -- assignment to an element of a mutable matrix
  • options(Sequence) -- see options(Function) -- get the optional arguments and default values of a function or method
  • package(Sequence) -- see package -- get containing package
  • part(Sequence,RingMap) (missing documentation)
  • read(Sequence) -- read from a file
  • Ring / Sequence -- see Ring / Ideal -- make a quotient ring
  • RingElement Sequence -- evaluation of polynomials
  • runHooks(Sequence,Thing) -- see runHooks -- run the hook functions stored in an object
  • setRandomSeed(Sequence) -- see setRandomSeed -- set starting point for random number generator
  • 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
  • union(Sequence) -- see union -- compute the union
  • 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.


The source of this document is in Macaulay2Doc/ov_lists.m2:721:0.