### 5.12 Del

• Del( <list>, <start>, <number> ).
• Description: removes from the <list> <number> elements from the <start> [included]. If <number> is zero, then the function removes all the elements from the <start>-th.

If the <start> number is negative, then the list is browsed from the right to the left starting from the last element. The last element index is $-1$, the penultimate’s is $-2$ $\cdots \phantom{\rule{0.3em}{0ex}}$ etc. The function removes the <number> elements from the list (or the whole list if <number> is zero) to the left.

The parameter <list> has to be a variable name, it is modified and the function returns Nil.

• Exemple(s): the command [x:=[1,2,3,4], Del(x,2,2), x] returns [1,4].

The command [x:=[1,2,3,4], Del(x,-2,2), x] returns [1,4].

NB: for compatibility reasons with the older version, the index $0$ also corresponds to the last element of the list.