Combinate two arrays

Hi to all!
If I have
["FRA", "MUC", "MOS"]
and
["LON", "ARG"]
How do I combinate them to be:
["FRA", "LON"] ["MUC", "LON"] ["MOS", "LON"] ["FRA", "ARG"] ["MUC", "ARG"] ["MOS", "ARG"]

I assume you need all combination of this? Use the comprehention:

for x <- ["FRA", "MUC", "MOS"], y <- ["LON", "ARG"], do: [x, y]
3 Likes

This is a usecase for the for keyword and comprehension:

for a <- ["FRA", "MUC", "MOS"], b <- ["LON", "ARG"] do
  [a, b]
end
2 Likes