aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/lullaby/table.lua48
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