138
Chapter 7: List Features
5 seq( seq(equation, start value, end value[, increments]) target list
name
Makes a list using the specified equation, range (start value and
end value) and increments.
Example
• Fillthelistusingtheequation
y = x
2
–
8
, where
x
increases
from
-
4 to 4 by increments of 2.
Additional examples
• The1stcommanddisplaysall
number from 0 to 10, the 2nd
all odd numbers from 1 to 21,
the 3rd all even numbers from
0 to 10.
* If increment is omitted, the default value 1 is used.
6 cumul cumul list
Sequentiallycumulateseachiteminthelist.
l
i
’
= l
1
+ l
2
+ ... + l
i
, where
l
i
isthei-thitemofthelist.
Example
• SetthelistL1to{4,2,7},and
obtainthecumulatedlistL1.
• Cumulatetheaboveresult.
7 df_list df_list list
Returnsanewlistusingthedifferencebetweenadjacentitemsin
the list.
l
i
’
= l
i+1
– l
i
, where
l
i
isthei-thitemofthelist.
Example
• SetthelistL1to{4,2,7},
and calculate the difference
betweenadjacentitems.