APLX Help : Help on APL language : APL Primitives : \ Scan
|
|
|
|
|
When used with a function operand, the The left operand of +\20 10 ¯5 7 (Compare with 20+10+¯5+7. The result shows
20 30 25 32 the running totals and the final sum)
,\'AB' 'CD' 'EF' (Repeated applications of ,)
AB ABCD ABCDEF
TABLE
5 2 3
4 7 6
×\ TABLE (Puts × between all elements of TABLE
5 10 30 and shows the result of each
4 28 168 multiplication in row 1 and in row 2.
Note that since no dimension was
specified, the operation takes place
on the last dimension, the columns.
See [] - the axis operator)
×⍀TABLE (First axis scan. Applies across each
5 2 3 row, i.e. Down the columns. Same as
20 14 18 ×\[1]TABLE)
^\ 1 1 1 0 1 1 (Applies logical 'and' over all
1 1 1 0 0 0 elements. A series of 1's is produced
up to the first 0. Shows where a test
first failed)
-\1 2 3 4 (The intermediate results are
1 ¯1 2 ¯2 1
1 - 2
1 - 2 - 3
1 - 2 - 3 - 4
Useful examples of Scan include: ^\ All 0 after the first 0
∨\ All 1 after the first 1
<\ 1 at the first 1
≤\ 0 at the first 0
≠\ 0 or 1, reversing at each 1
|
|
APLX Help : Help on APL language : APL Primitives : \ Scan
|
|
Copyright © 1996-2010 MicroAPL Ltd