73.5 because the first time I tried to do some functional programming, I had to cheat.
To be precise I had to cheat with this function
Code:
function newInsert(oldTable,value)
local workTable=oldTable or {}
workTable[#workTable+1]=value
return workTable
end
it should get a table (or an array for those that don't know lua) and a value, then return a new table that is a copy of the table but with that extra value.
I did try
Code:
local workTable=oldTable or {}
if #workTable>=1 then
return {value,unpack(workTable)}
end
return {value}
end
however, if the table contains about 8000 values it will cause a crash and it is a lot slower. It also puts the new value at the beginning of the new table rather then at the end of it, though for why I need it that doesn't matter.