init commit

This commit is contained in:
2025-07-14 15:06:53 -04:00
commit 932b0768b2
4 changed files with 122 additions and 0 deletions

View File

@ -0,0 +1,21 @@
--!strict
local Array = require("../../luau/src")
local numbers = Array.new()
for i = 1, 100 do
numbers:push(i)
end
print(numbers:debug_display(), "\nlength=", numbers:len())
local start = os.clock()
numbers:map(function(n: number)
return tostring(n)
end):foreach(function(e) print("(:map)squared=", e) end)
numbers:filter(function(n: number)
return bit32.band(n, 1) ~= 0
end):foreach(function(e) print("(:filter)odd=", e) end)
print(os.clock()-start)