update main #3

Merged
kistaro merged 2 commits from pyrex/chameleonic:main into main 2022-12-17 23:52:56 +00:00
Showing only changes of commit d0eba82c7b - Show all commits

View File

@ -22,7 +22,6 @@ function names(root)
end
function _doall(x)
for n in names(x) do
for mod in all(modules) do
local f=mod[n]
@ -32,13 +31,12 @@ function _doall(x)
end
-- source: https://www.lexaloffle.com/bbs/?pid=78990
gaps={57,23,10,4,1}
gaps=split"57,23,10,4,1"
--{701,301,132,57,23,10,4,1}
function shellsort(a)
for gap in all(gaps) do
for i=gap+1,#a do
local x=a[i]
local j=i-gap
local x,j=a[i],i-gap
while j>=1 and a[j].key>x.key do
a[j+gap]=a[j]
j-=gap