Closed athas closed 7 years ago
Hm, the iota creates boxed arrays, doesn't it?
Came up with this version. Not a fan of the duplication:
{+/+/⍵×⍵=((⍴⍵)⍴⍳1↓⍴⍵)+(⍴⍵)⍴⍳1↑⍴⍵}5 5⍴10
The following works in apltail:
{+/+/⍵×⍵=((⍴⍵)⍴⍳⊃⍴⍵)+(⍴⍵)⍴⍳⊃⍴⍵}5 5⍴10
The original version requires nested arrays and we require iota to take a scalar argument.
https://twitter.com/dyalogapl/status/755706056005877760
It's a modern version of this piece of ancestor worship: http://keiapl.org/anec/#Dijkstra