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

MutableList -- the class of all mutable lists

Description

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

Normally the entries in a mutable list are not printed, to prevent infinite loops in the printing routines. To print them out, use peek.
i1 : s = new MutableList from {a,b,c};
i2 : s#2 = 1234;
i3 : s

o3 = MutableList{...3...}

o3 : MutableList
i4 : peek s

o4 = MutableList{a, b, 1234}

See also

Menu

Types of mutable list:

  • Bag -- the class of all bags

Methods that use a mutable list:

  • positions(MutableList,Function) -- see positions -- which elements of a list satisfy a condition
  • remove(MutableList,ZZ) -- see remove -- remove an entry from a mutable hash table, list, or database

For the programmer

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


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