Home Online Manual
Top
Back: indepSet
Forward: interpolation
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.57 insert

Syntax:
insert ( list_expression, expression )
insert ( list_expression, expression, int_expression )
Type:
list
Purpose:
inserts a new element (expression) into a list at the beginning, or (if called with 3 arguments) after the given position (the input is not changed).
Example:
 
  list L=1,2;
  insert(L,4,2);
==> [1]:
==>    1
==> [2]:
==>    2
==> [3]:
==>    4
  insert(L,4);
==> [1]:
==>    4
==> [2]:
==>    1
==> [3]:
==>    2
See delete; list.