Consider m = [1 2 3; 4 5 6; 7 8 9]
for idx in eachindex(m)
println(idx)
end
I was expecting it to print (1, 1) (2, 1), (3, 1) .... (1, 3), (2, 3), (3, 3) but it prints 1, 2, ..., 9.
What's the most elegant way to loop through all the indices of a multidimensional array?