CoCoA:Insert

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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>