Owner's manual

Table Of Contents
Applying a Function or program to a List
The DOLIST coiranand enables you to run programs or execute fmrctions
on groups of lists.
To run a program or execute a Function on Lists
When you are operating on a number of lists—especially long lists—it
may be easier and clearer if you are in RPN mode (as in the case of the
following example).
1. Enter the lists.
2. Enter the number of lists to be operated on. This number is the number
of elements in each list operated on in each iteration of the function or
program.
3. Enter a program or function.
4. Execute DOLIST.
Example; Apply the function defined by a,u + (6„ x c„) to three lists,
a, b, and c.
1. Enter the lists.
For example, ¡1, 2, 3, 4), {4, 5, 6, 7}, and ¡7, 8, 9, 11|.
2. Enter the number of lists to be operated on (for example, 3).
3. Enter the fimction.
« * + »
4. Execute the DOLIST command.
0 {PRG)lIST procedures DOLIST
The answer is {29, 42, 57, 81).
To apply a procedure sequentially to elements of a list
The DOSlJBS command enables you to apply a program or function to the
elements in the list one after the other. In RPN mode, the procedure is;
1. Enter the list.
2. Enter the frame index. This is the number of elements affected by each
iteration of the fimction. For example, entering 3 would take 3
elements from the list and use them as arguments for the fimction.
3. Enter a program or function.
4. Execute DOSUBS.
Lists and Sequences
Page 9-5