CoCoA:Insert

From ApCoCoAWiki

Insert

insert an object in a list

Description

This function inserts E into the list L as the N-th component.

Example

  L := [<quotes>a</quotes>,<quotes>b</quotes>,<quotes>d</quotes>,<quotes>e</quotes>];
  Insert(L,3,<quotes>c</quotes>);
  L;
[<quotes>a</quotes>, <quotes>b</quotes>, <quotes>c</quotes>, <quotes>d</quotes>, <quotes>e</quotes>]
-------------------------------

Syntax

Insert(V:LIST,N:INT,E:OBJECT):NULL

where V is a variable containing a list.

Append

Remove

   <type>list</type>