Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.22 KB | None | 0 0
  1. function array_cartesian_product (arr1, arr2)
  2.     local response = {}
  3.     for_each_index(arr1, function (i,v) for_each_index(arr2, function (i2, v2) table.insert(response, { v , v2 }) end) end)
  4.     return response
  5. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement