
17
3. Execute STREAM. STREAM is designed to take the first two
elements, excute the operation, then take the result and the next
element and execute again. This process continues until all the
elements have been used as arguments.
Example; Multiply all of the elements in { 1 2 3 4 5 } together.
Step 1: Enter the list and the function.
Q(TT) 1 gpg 2 (|p3 3 (SP^
4 5 fENTER} 0(«3 ©
ÎENTER)
Step 2: Execute the function.
fP?^ LIST PROS
{12 3 4 5 }
1: « * »
1= 120
List Manipulations
The following functions provide ways to manipulate the elements of a
list:
fMTHl i... :
sorts the elements of a list in ascending
order. The list must be on level 1.
(MThI L. I ST REvL. I reverses the elements of a list. The list must
be on level 1.
(±D adds items to the begining or end of a list, or concatenates two
lists. To add an item to begining of a list, enter the item, enter the
list, and then press [+}■ To add an item to the end of a list, enter
the list, enter the item, and then press CD-
replaces the list on level 1 withfPRG~) ÎNXT)
the list’s first element.
fPRG) (NXTI TFiIL replaces the list on level 1 with
all but the first element of the list.
(PRGI . : . ' .-iLEM GET replaces the list on level 2 and
position index on level 1 with the element at that position within
the list.
17-6 Lists and Sequences
Comentários a estes Manuais