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