bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

better apl array coding


From: enztec
Subject: better apl array coding
Date: Mon, 14 Jun 2021 18:45:55 -0600

hello

i've been using this looping for array work but there has to be a better apl 
way of coding the indexing of the ar array
any suggestions



∇rs←lp;a;b;ar;i
'lp'
'ar'
+ar←4 4⍴11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44
'a '
+a←1 2 3 4 4 3 2 1
'b '
+b←1 2 3 4 4 3 2 1
i←1
rs←⍴0
sp:
rs←rs,ar[a[i]; b[i]]
→((i←i+1)⍴a)/sp
''
∇




reply via email to

[Prev in Thread] Current Thread [Next in Thread]