Я не знаю, нужна ли вам одна итерация с обоими значениями или декартово произведение итераторов, но вот пример для обоих:
julia> M = 1:3; N = 4:6;
julia> for (m, n) in zip(M, N) # single iterator over both M and N
@show m, n
end
(m, n) = (1, 4)
(m, n) = (2, 5)
(m, n) = (3, 6)
julia> for m in M, n in N # Cartesian product
@show m, n
end
(m, n) = (1, 4)
(m, n) = (1, 5)
(m, n) = (1, 6)
(m, n) = (2, 4)
(m, n) = (2, 5)
(m, n) = (2, 6)
(m, n) = (3, 4)
(m, n) = (3, 5)
(m, n) = (3, 6)