diff options
| author | ame <[email protected]> | 2026-05-27 06:00:43 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2026-05-27 06:00:43 -0500 |
| commit | 6f176096b8f3a2088c01d67a36e4b67750ec179e (patch) | |
| tree | 78a195e1b743f56380e164177c5b1393126ed7d7 /library | |
| parent | 0addb6ba5b45168b7abe2ff0db6ddcfff20d1865 (diff) | |
.table updates, .dup & .equal
Diffstat (limited to 'library')
| -rw-r--r-- | library/lullaby/table.lua | 48 |
1 files changed, 18 insertions, 30 deletions
diff --git a/library/lullaby/table.lua b/library/lullaby/table.lua index 51414f7..f0f11ec 100644 --- a/library/lullaby/table.lua +++ b/library/lullaby/table.lua @@ -1,6 +1,6 @@ ---@meta ----to be rewritten +---to be mostly rewritten ---@class lullaby.table local table = {} @@ -15,6 +15,23 @@ local table = {} ---@return string[] function table.split(haystack, search, skip) end +---compares 2 tables recursivley +---@param A any[] +---@param B any[] +---@param depth integer? max depth to search, defaults to -1 +---@return boolean +function table.equal(A, B, depth) end + +---clones table recursivley +---@param table any[] +---@return value[] +function table.dup(table) end + +---gets table len, useful for key,value tables +---@param table any[] +---@return integer +function table.len(table) end + ---greatest, least ---@deprecated ---@param array number[] @@ -40,33 +57,4 @@ function table.bubblesort(array) end ---@param array number[] function table.heapsort(array) end ----least, greatest ----@deprecated ----@param array integer[] -function table.countintsort(array) end - ----dont use this lol ----@deprecated ----greatest, least ----@param array number[] -function table.miraclesort(array) end - ----dont use this lol ----@deprecated ----greatest, least ----@param array number[] -function table.stalinsort(array) end - ----dont use this lol ----@deprecated ----greatest, least ----@param array number[] -function table.slowsort(array) end - ----dont use this lol ----@deprecated ----greatest, least ----@param array number[] -function table.bogosort(array) end - return table |
