Is there a more efficient/idiomatic way to retrieve cells of a matrix that are on the same row and column as the given cell?
q) f:{except[;y] x[y div n;],x[;y mod n:count first x]}
q) show A:s#til prd s:2 3
0 1 2
3 4 5
q) f[A;4]
3 5 1
q) f[A;2]
0 1 5