> At a time when adding two lists of numbers meant a map or a loop, APL introduced the idea of operating on the entire array at once.
Am I missing something, how is this different from a map?
Am I missing something, how is this different from a map?
3 3 3 ⍴ ⍳10
1 2 3
4 5 6
7 8 9
10 1 2
3 4 5
6 7 8
9 10 1
2 3 4
5 6 7
M ← 3 3 3 ⍴ ⍳10
M*M
1.00000E0 4.00000E0 2.70000E1
2.56000E2 3.12500E3 4.66560E4
8.23543E5 1.67772E7 3.87420E8
1.00000E10 1.00000E0 4.00000E0
2.70000E1 2.56000E2 3.12500E3
4.66560E4 8.23543E5 1.67772E7
3.87420E8 1.00000E10 1.00000E0
4.00000E0 2.70000E1 2.56000E2
3.12500E3 4.66560E4 8.23543E5
That's 3 nested 3x3 matrices, and we take the pointwise product of each of them with just the usual multiplication operator.How many maps did you want?