Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function array_cartesian_product (arr1, arr2)
- local response = {}
- for_each_index(arr1, function (i,v) for_each_index(arr2, function (i2, v2) table.insert(response, { v , v2 }) end) end)
- return response
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement