Top
Back: 5.1.50 indepSet
Forward: 5.1.52 interred
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.1 Functions
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.1.51 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.


Top Back: 5.1.50 indepSet Forward: 5.1.52 interred FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.1 Functions Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.