Hi,
I was trying to define a map like this
(1)
local m = map{ keyArr[i] = list{ dataArr[ i ], sizeArr[ i ] } } -- compile issue
then I tried 2.
(2).
local x = list{ dataArr[ i ], sizeArr[ i ] }
local m = map{ keyArr[i] = x } -- compile issue
then I tried
(3)
local key = keyArr[i]
local x = list{ dataArr[ i ], sizeArr[ i ] }
local m = map{ key = x } -- no compile issue, but the key is 'key' and not value of key which is keyArr[i]
so finally I had to
(4)
local x = list{ dataArr[ i ], sizeArr[ i ] }
local y = map()
y[ apidArr[ i ] ] = x
Why 1, 2 or 3 didn’t work. Isn’t it tough to explore something like this when we do not find associated documentation.