!²
12 `56 `˜šš
45`1 `
9 `14 `
`
Select the VAR menu and execute MNX2.
J%MNX2%
Find the minimum element.
%MIN%
Applying a Program to an ArrayAPLY makes use of list processing to transform each element of an array according to a desired procedure.
The procedure applied to each element must be a program that takes exactly one argument (i.e. the element) and returns exactly one result (i.e. the transformed element).
The procedure assumes flag
Level 2 | Level 1 | → | Level 1 |
|
|
|
|
[ array ] | « program » | → | [[ array ]] or {{ array }} |
|
|
|
|
Techniques used in APLY
Manipulating
Application of List Processing. APLY makes use of DOSUBS (although DOLIST might also have been used) to perform the actual transformation of array elements.
Using an IFERR…THEN…ELSE…END Structure. The entire symbolic
Using Flags. User flag 1 is used to track the case when the input array is a vector.
APLY program listing
Program: | Comments: |
« |
|
→ a p | Store the array and program in local variables. |
« | Begin the main local variable structure. |
|
|