Using the Iterators package, it might look like this:
using Iterators
for p in product([1,2], [3,4])
println(p)
end
where you would replace println
with your algorithm. You can also use collect
if it's important to get the set of all combinations.