Return first differences of elements of a list
The ΔLIST command returns the first differences of the elements in the list Ldata, i.e.:
$$ data_2-data_1 \\
data_3-data_2 \\
data_4-data_3 \\
\ldots $$
The list must contain at least two elements, and the elements themselves must be suitable for mutual subtraction.
ΔLIST is fully equivalent to its userRPL counterpart.
Input
4:
3:
2:
1: { 39 18 5 '2*X' 73 }
…………………………………………………………………………………………………………
ΔLIST
Output
4:
3:
2:
1: { -21 -13 '2*X-5' '73-2*X' }
…………………………………………………………………………………………………………
| Command | Short Description | |
|---|---|---|
| →LIST | Assemble a list from its elements | |
| LIST→ | Split a list into its elements | |
| DOLIST | Do a procedure with elements of lists | CHANGED |
| DOSUBS | Do a procedure on a subset of a list | CHANGED |
| MAP | Do a procedure on each element of a list, recursively | |
| MAPLIST→ | Do a procedure on each element recursively, return individual elements | NEW |
| STREAM | Do a procedure on consecutive elements of a list | |
| ΔLIST | First differences on the elements of a list | |
| ΣLIST | Sum of all elements in a list | CHANGED |
| ΠLIST | Product of all elements in a list | CHANGED |
| ADD | Concatenate lists and/or elements | CHANGED |
| SORT | Sort elements in a list | |
| REVLIST | Reverse the order of elements in a list | |
| ADDROT | Add elements to a list, keep only the last N elements | NEW |
| SEQ | Assemble a list from results of sequential procedure |