From 6f176096b8f3a2088c01d67a36e4b67750ec179e Mon Sep 17 00:00:00 2001 From: ame Date: Wed, 27 May 2026 06:00:43 -0500 Subject: .table updates, .dup & .equal --- library/lullaby/table.lua | 48 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 30 deletions(-) (limited to 'library') 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 -- cgit v1.2.3