Skip to main content

Array

An array is a table consisting of index-value pairs. You don't need to manually specify the indices when you create an array.

local array = {
	"hello",
	"world",
}

Aliases

List

Functions

concat

Array.concat(
......any--

The arrays to concatenate.

) → {T}--

The concatenated array.

Joins multiple arrays together into a single array.

Aliases

join, merge

local table1 = { 1, 2, 3 }
local table2 = { 4, 5, 6 }

local new = Concat(table1, table2) -- { 1, 2, 3, 4, 5, 6 }

sort

Array.sort(
array{T},--

The array to sort.

comparator?(
aT,
bT
) → boolean--

The comparator function.

) → {T}--

The sorted array.

Sorts an array.

local array = { "a", "b", "c", "d", "e" }

local new = Sort(array, function(a, b)
	return a > b
end) -- { "e", "d", "c", "b", "a" }

pop

Array.pop(
array{T},--

The array to pop an element from.

count?number=1--

The number of elements to pop.

) → {T}--

An array with the popped elements removed.

Removes an element from the end of the array, and returns the array with the popped elements removed.

local array = { 1, 2, 3 }

local new = Pop(array) -- { 1, 2 }
local new = Pop(array, 2) -- { 1 }

copy

Array.copy(
array{T}--

The array to copy.

) → {T}--

The copied array.

Copies an array.

local array = { 1, 2, 3 }

local new = Copy(array) -- { 1, 2, 3 }

print(new == array) -- false

push

Array.push(
array{T},--

The array to push an element to.

......T--

The elements to push.

) → {T}--

The array with the pushed elements.

Adds elements to the end of the array.

Aliases

append

local array = { 1, 2, 3 }

local new = Push(array, 4, 5, 6) -- { 1, 2, 3, 4, 5, 6 }

update

Array.update(
array{T},--

The array to update.

indexnumber,--

The index to update.

updater?(
valueT,
indexnumber
) → T,--

The updater function.

callback?(indexnumber) → T--

The callback function.

) → {T}--

The updated array.

Updates an array at the given index. If the value at the given index does not exist, callback will be called, and its return value will be used as the value at the given index.

local array = { 1, 2, 3 }

local new = Update(array, 2, function(value)
	return value + 1
end) -- { 2, 3, 3 }

local new = Update(array, 4, function(value)
	return value + 1
end, function(value)
	return 10
end) -- { 1, 2, 3, 10 }

find

Array.find(
array{T},--

The array to search.

value?any,--

The value to search for.

from?number--

The index to start searching from.

) → number?--

The index of the first item in the array that matches the value.

Finds the index of the first item in the array that matches the value. This is mostly a wrapper around table.find, with the ability to specify a negative number as the start index (to search relative to the end of the array).

Aliases

indexOf

local array = { "hello", "world", "hello" }

local index = Find(array, "hello") -- 1
local index = Find(array, "hello", 2) -- 3

first

Array.first(
array{T}--

The array to get the first item from.

) → T--

The first item in the array.

Gets the first item in the array.

local array = { 1, 2, 3 }

local value = First(array) -- 1

map

Array.map(
array{T},--

The array to map.

mapper(
valueT,
indexnumber,
array{T}
) → U?--

The mapper function.

) → {U}--

The mapped array.

Maps the array using the mapper function.

local array = { 1, 2, 3 }

local new = Map(array, function(value, index)
	return value * 2
end) -- { 2, 4, 6 }

is

Array.is(
objectany--

The object to check.

) → boolean--

Whether the object is an array.

Checks if the given object is an array.

local array = { 1, 2, 3 }
local dictionary = { hello = "world" }
local mixed = { 1, 2, hello = "world" }

Array.is(array) -- true
Array.is(dictionary) -- false
Array.is(mixed) -- false

reverse

Array.reverse(
array{T}--

The array to reverse.

) → {T}--

The reversed array.

Reverses the order of the items in an array.

local array = { 1, 2, 3 }

local new = Reverse(array) -- { 3, 2, 1 }

zip

Array.zip(
...{any}--

The arrays to zip together.

) → {any}--

The zipped array.

Zips multiple arrays together into a single array.

local table1 = { 1, 2, 3 }
local table2 = { "hello", "world", "goodbye" }

local new = Zip(table1, table2) -- { { 1, "hello" }, { 2, "world" }, { 3, "goodbye" } }

flatten

Array.flatten(
array{T},--

The array to flatten.

depth?number--

The depth to flatten the array to.

) → {T}--

The flattened array.

Flattens an array. If depth is not specified, it will flatten the array as far as it can go.

local array = {
	{ 1, 2, 3 },
	{ 4, 5, 6 },
	{ 7, { 8, 9 } },
}

local new = Flatten(array) -- { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
local new = Flatten(array, 1) -- { 1, 2, 3, 4, 5, 6, 7, { 8, 9 } }

includes

Array.includes(
array{T},--

The array to search.

valueany,--

The value to search for.

from?number--

The index to start searching from.

) → boolean--

Whether the array contains the value.

Checks whether the array contains the value. This is a wrapper around Find.

Aliases

contains, has

local array = { "hello", "world", "goodbye" }

local value = Includes(array, "hello") -- true
local value = Includes(array, "sift") -- false
local value = Includes(array, "hello", 2) -- false

removeValues

Array.removeValues(
array{T},--

The array to remove values from.

...T--

The values to remove.

) → {T}--

The array with the values removed.

Removes values from an array.

local array = { "a", "b", "c", "c", "d", "e" }

local new = RemoveValues(array, "c", "d") -- { "a", "b", "e" }

create

Array.create(
lengthnumber,--

The length of the array to create.

value?T--

The value to fill the array with.

) → {T}--

The created array.

Creates an array of the given length, filled with the given value. This is just a wrapper around table.create.

local array = Create(3, "Hello")

print(array) -- { "Hello", "Hello", "Hello" }

splice

Array.splice(
array{T},--

The array to splice.

start?number,--

The index to start splicing at (can be negative).

end?number,--

The index to end splicing at (can be negative).

......T--

The values to insert.

) → {T}--

The spliced array.

Splices an array.

local array = { 1, 2, 3, 4, 5 }

local new = Splice(array, 3, 4, 6, 7) -- { 1, 2, 6, 7, 4, 5 }
local new = Splice(array, -1, 0, 6, 7) -- { 1, 2, 3, 4, 6, 7 }
local new = Splice(array, 4, -1, 6, 7) -- { 1, 2, 3, 6, 7, 5 }

difference

Array.difference(
arrayArray<V>,--

The array to compare.

......Array<V>--

The arrays to compare against.

) → Array<V>--

The difference between the arrays.

Returns an array of values that are in the first array, but not in the other arrays.

local array1 = { "hello", "world" }
local array2 = { "cat", "dog", "hello" }

local difference = Difference(array1, array2) -- { "world" }

last

Array.last(
array{T}--

The array to get the last element of.

) → T--

The last element of the array.

Gets the last element of the array.

local array = { 1, 2, 3 }

local value = Last(array) -- 3

removeIndex

Array.removeIndex(
array{T},--

The array to remove the value from.

indexnumber--

The index to remove the value from (can be negative).

) → {T}--

The array with the value removed.

Removes a value from an array at the given index.

local array = { 1, 2, 3 }

local new = RemoveIndex(array, 1) -- { 2, 3 }
local new = RemoveIndex(array, -1) -- { 1, 3 }

toSet

Array.toSet(
array{T}--

The array to convert to a set.

) → Set<T>--

The set.

Converts an array to a set.

local array = { "a", "b", "b", "c", "d" }

local set = ToSet(array) -- { a = true, b = true, c = true, d = true }

removeValue

Array.removeValue(
array{T},--

The array to remove the value from.

valueT--

The value to remove.

) → {T}--

The array with the value removed.

Removes a value from an array.

local array = { 1, 2, 3 }

local new = RemoveValue(array, 2) -- { 1, 3 }

findWhere

Array.findWhere(
array{T},--

The array to search.

predicate(
valueT,
indexnumber,
array{T}
) → any,--

The predicate to use to check the array.

from?number--

The index to start searching from.

) → number--

The index of the first item in the array that matches the predicate.

Finds the index of the first item in the array that passes the predicate.

local array = { 1, 2, 3 }

local index = FindWhere(array, function(item, index)
	return item > 1
end) -- 2

reduceRight

Array.reduceRight(
array{T},--

The array to reduce.

reducer(
accumulatorU,
valueT,
indexnumber,
array{T}
) → U,--

The reducer to use.

initialReduction?U={T}[#{T}]--

The initial accumulator value.

) → U--

The final accumulator value.

Reduces the array using the given reducer and initial accumulator value, starting from the end of the array. If no initialReduction value is given, the last item in the array is used.

local array = { 1, 2, 3 }

local value = ReduceRight(array, function(accumulator, item, index)
	return accumulator - item
end) -- 0

local value = ReduceRight(array, function(accumulator, item, index)
	table.insert(accumulator, item)
	return accumulator
end, {}) -- { 3, 2, 1 }

at

Array.at(
array{T},--

The array to get the value from.

indexnumber--

The index to get the value from (can be negative).

) → T--

The value at the given index.

Gets a value from an array at the given index.

local array = { 1, 2, 3 }

local value = At(array, 1) -- 1
local value = At(array, 0) -- 3

filter

Array.filter(
array{T},--

The array to filter.

filterer?(
valueT,
indexnumber,
array{T}
) → any--

The callback to use to filter the array.

) → {T}--

The filtered array.

Filters an array using a filterer callback. Any items that do not pass the filterer will be removed from the array.

If no filterer is provided, all items will be kept.

local array = { 1, 2, 3 }

local result = Filter(array, function(item, index)
	return item > 1
end) -- { 2, 3 }

every

Array.every(
array{T},--

The array to check.

predicate(
valueT,
indexnumber,
array{T}
) → any--

The predicate to use to check the array.

) → boolean--

Whether every item in the array passes the predicate.

Checks whether every item in the array passes the predicate.

local array = { 1, 2, 3 }

local value = Every(array, function(item, index)
	return item > 0
end) -- true

local value = Every(array, function(item, index)
	return item > 1
end) -- false

copyDeep

Array.copyDeep(
array{T}--

The array to copy.

) → {T}--

The copied array.

Copies an array, with deep copies of all nested arrays.

local array = { 1, 2, 3, { 4, 5 } }

local result = CopyDeep(array) -- { 1, 2, 3, { 4, 5 } }

print(result == array) -- false
print(result[4] == array[4]) -- false

unshift

Array.unshift(
array{T},--

The array to insert the values to.

......T--

The values to insert.

) → {T}--

The array with the values inserted.

Inserts values to the beginning of an array.

Aliases

prepend

local array = { 1, 2, 3 }

local new = Unshift(array, 4, 5) -- { 4, 5, 1, 2, 3 }

shuffle

Array.shuffle(
array{T}--

The array to shuffle.

) → {T}--

The shuffled array.

Randomises the order of the items in an array.

local array = { 1, 2, 3 }

local new = Shuffle(array) -- { 2, 3, 1 }

equalsDeep

Array.equalsDeep(
......{any}--

The arrays to compare.

) → boolean--

Whether the arrays are equal.

Compares two arrays for equality using deep comparison.

local array = { 1, 2, 3, { 4, 5 } }
local other = { 1, 2, 3, { 4, 5 } }

local value = EqualsDeep(array, other) -- true
local value = EqualsDeep(array, other, { 1, 2, 3, { 4, 5 } }) -- true
local value = EqualsDeep(array, other, { 1, 2, 3, { 4, 6 } }) -- false

freeze

Array.freeze(
array{T}--

The array to freeze.

) → {T}--

The frozen array.

Freezes the top level of the array, making it read-only.

local array = { 1, 2, 3, { 4, 5, 6 } }

local new = Freeze(array)

new[1] = 4 -- error!
new[4][1] = 7 -- still works!

removeIndices

Array.removeIndices(
array{T},--

The array to remove the indices from.

......number--

The indices to remove the values from (can be negative).

) → {T}--

The array with the values removed.

Removes values from an array at the given indices.

local array = { 1, 2, 3 }

local new = RemoveIndices(array, 1, 2) -- { 3 }
local new = RemoveIndices(array, 0, -1) -- { 1 }

set

Array.set(
array{T},--

The array to set the value on.

indexnumber,--

The index to set the value at (can be negative).

valueT--

The value to set.

) → {T}--

The array with the value set.

Sets a value on an array at the given index.

local array = { 1, 2, 3 }

local new = Set(array, 2, 4) -- { 1, 4, 3 }
local new = Set(array, -1, 4) -- { 1, 2, 4 }

count

Array.count(
array{T},--

The array to count the number of items in.

predicate?(
valueT,
indexnumber,
array{T}
) → any--

The predicate to use to filter the array.

) → number--

The number of items in the array.

Counts the number of items in an array.

local array = { 1, 2, 3 }

local value = Count(array) -- 3
local value = Count(array, function(item, index)
	return item == 2
end) -- 1

shift

Array.shift(
array{T},--

The array to shift.

count?number--

The number of items to shift.

) → {T}--

The shifted array.

Removes the first item from an array and returns the array with the item removed.

local array = { 1, 2, 3 }

local new = Shift(array) -- { 2, 3 }
local new = Shift(array, 2) -- { 3 }

findWhereLast

Array.findWhereLast(
array{T},--

The array to search.

predicate(
valueT,
indexnumber,
array{T}
) → any,--

The predicate to use to check the array.

from?number--

The index to start searching from.

) → number--

The index of the last item in the array that matches the predicate.

Finds the index of the last item in the array that passes the predicate.

local array = { "hello", "world", "hello" }

local index = FindWhereLast(array, function(item, index)
	return item == "hello"
end) -- 3

local index = FindWhereLast(array, function(item, index)
	return item == "hello"
end, 2) -- 1

reduce

Array.reduce(
array{T},--

The array to reduce.

reducer(
accumulatorU,
valueT,
indexnumber,
array{T}
) → U,--

The reducer to use.

initialReduction?U={T}[1]--

The initial accumulator value.

) → U--

The final accumulator value.

Reduces the array using the given reducer and initial accumulator value. If no initialReduction value is given, the first item in the array is used.

local array = { 1, 2, 3 }

local value = Reduce(array, function(accumulator, item, index)
	return accumulator - item
end) -- -4

local value = Reduce(array, function(accumulator, item, index)
	table.insert(accumulator, item)
	return accumulator
end, {}) -- { 1, 2, 3 }

equals

Array.equals(
......{any}--

The arrays to compare.

) → boolean--

Whether the arrays are equal.

Compares two arrays for equality.

local array = { 1, 2, 3 }
local other = { 1, 2, 3 }

local value = Equals(array, other) -- true
local value = Equals(array, other, { 1, 2, 3 }) -- true
local value = Equals(array, other, { 1, 2, 4 }) -- false

concatDeep

Array.concatDeep(
......any--

The arrays to concatenate.

) → {T}--

The concatenated array.

Joins multiple arrays together into a single array, with deep copies of all nested arrays.

Aliases

joinDeep, mergeDeep

local table1 = { 1, 2, { 3, 4 } }
local table2 = { 5, 6, { 7, 8 } }

local new = ConcatDeep(table1, table2) -- { 1, 2, { 3, 4 }, 5, 6, { 7, 8 } }

findLast

Array.findLast(
array{T},--

The array to search.

value?any,--

The value to search for.

from?number--

The index to start searching from.

) → number?--

The index of the last item in the array that matches the value.

Finds the index of the last item in the array that matches the value.

local array = { "hello", "world", "hello" }

local index = FindLast(array, "hello") -- 3
local index = FindLast(array, "hello", 2) -- 1

slice

Array.slice(
array{T},--

The array to slice.

from?number,--

The index to start from (can be negative).

to?number--

The index to end at (can be negative).

) → {T}--

The sliced array.

Slices an array.

local array = { 1, 2, 3, 4, 5 }

local new = Slice(array, 2, 3) -- { 2, 3 }
local new = Slice(array, -2, -1) -- { 3, 4 }
local new = Slice(array, 3) -- { 3, 4, 5 }

zipAll

Array.zipAll(
......{any}--

The arrays to zip.

) → {any}--

The zipped array.

Zips multiple arrays together into a single array, filling in missing values with None.

local table1 = { 1, 2, 3, 4 }
local table2 = { "hello", "world", "goodbye" }

local new = ZipAll(table1, table2) -- { { 1, "hello" }, { 2, "world" }, { 3, "goodbye" }, { 4, None } }

differenceSymmetric

Array.differenceSymmetric(
arrayArray<V>,--

The array to compare.

......Array<V>--

The arrays to compare against.

) → Array<V>--

The symmetric difference between the arrays.

Returns an array of values that are in the first array, but not in the other arrays, and vice versa.

local array1 = { "hello", "world" }
local array2 = { "cat", "dog", "hello" }

local difference = DifferenceSymmetric(array1, array2) -- { "world", "cat", "dog" }

some

Array.some(
array{T},--

The array to check.

predicate(
valueT,
indexnumber,
array{T}
) → any--

The predicate to use to check the array.

) → boolean--

Whether some item in the array passes the predicate.

Checks whether some item in the array passes the predicate.

local array = { 1, 2, 3 }

local value = Some(array, function(item, index)
	return item > 1
end) -- true

local value = Some(array, function(item, index)
	return item > 3
end) -- false

insert

Array.insert(
array{T},--

The array to insert the value into.

indexnumber,--

The index to insert the value at (can be negative).

values...T--

The values to insert.

) → {T}--

The array with the value inserted.

Inserts the given values into an array at the given index, shifting all values after it to the right. If the index is negative (or 0), it is counted from the end of the array.

If the index to insert at is out of range, the array is not modified.

local array = { 1, 2, 3 }

local newArray = Insert(array, 2, 4) -- { 1, 4, 2, 3 }

freezeDeep

Array.freezeDeep(
array{T}--

The array to freeze.

) → {T}--

The frozen array.

Freezes the entire array, making it read-only, including all nested arrays.

local array = { 1, 2, 3, { 4, 5, 6 } }

local new = FreezeDeep(array)

new[1] = 4 -- error!
new[4][1] = 7 -- error!
Show raw api
{
    "functions": [
        {
            "name": "concat",
            "desc": "Joins multiple arrays together into a single array.\n\n#### Aliases\n\n`join`, `merge`\n\n```lua\nlocal table1 = { 1, 2, 3 }\nlocal table2 = { 4, 5, 6 }\n\nlocal new = Concat(table1, table2) -- { 1, 2, 3, 4, 5, 6 }\n```",
            "params": [
                {
                    "name": "...",
                    "desc": "The arrays to concatenate.",
                    "lua_type": "...any"
                }
            ],
            "returns": [
                {
                    "desc": "The concatenated array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 26,
                "path": "src/Array/concat.lua"
            }
        },
        {
            "name": "sort",
            "desc": "Sorts an array.\n\n```lua\nlocal array = { \"a\", \"b\", \"c\", \"d\", \"e\" }\n\nlocal new = Sort(array, function(a, b)\n\treturn a > b\nend) -- { \"e\", \"d\", \"c\", \"b\", \"a\" }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to sort.",
                    "lua_type": "{T}"
                },
                {
                    "name": "comparator?",
                    "desc": "The comparator function.",
                    "lua_type": "(a: T, b: T) -> boolean"
                }
            ],
            "returns": [
                {
                    "desc": "The sorted array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/Array/sort.lua"
            }
        },
        {
            "name": "pop",
            "desc": "Removes an element from the end of the array, and returns\nthe array with the popped elements removed.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Pop(array) -- { 1, 2 }\nlocal new = Pop(array, 2) -- { 1 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to pop an element from.",
                    "lua_type": "{T}"
                },
                {
                    "name": "count?",
                    "desc": "The number of elements to pop.",
                    "lua_type": "number = 1"
                }
            ],
            "returns": [
                {
                    "desc": "An array with the popped elements removed.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/pop.lua"
            }
        },
        {
            "name": "copy",
            "desc": "Copies an array.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Copy(array) -- { 1, 2, 3 }\n\nprint(new == array) -- false\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to copy.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The copied array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Array/copy.lua"
            }
        },
        {
            "name": "push",
            "desc": "Adds elements to the end of the array.\n\n#### Aliases\n\n`append`\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Push(array, 4, 5, 6) -- { 1, 2, 3, 4, 5, 6 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to push an element to.",
                    "lua_type": "{T}"
                },
                {
                    "name": "...",
                    "desc": "The elements to push.",
                    "lua_type": "...T"
                }
            ],
            "returns": [
                {
                    "desc": "The array with the pushed elements.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/Array/push.lua"
            }
        },
        {
            "name": "update",
            "desc": "Updates an array at the given index. If the value at the given index does\nnot exist, `callback` will be called, and its return value will be used\nas the value at the given index.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Update(array, 2, function(value)\n\treturn value + 1\nend) -- { 2, 3, 3 }\n\nlocal new = Update(array, 4, function(value)\n\treturn value + 1\nend, function(value)\n\treturn 10\nend) -- { 1, 2, 3, 10 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to update.",
                    "lua_type": "{T}"
                },
                {
                    "name": "index",
                    "desc": "The index to update.",
                    "lua_type": "number"
                },
                {
                    "name": "updater?",
                    "desc": "The updater function.",
                    "lua_type": "(value: T, index: number) -> T"
                },
                {
                    "name": "callback?",
                    "desc": "The callback function.",
                    "lua_type": "(index: number) -> T"
                }
            ],
            "returns": [
                {
                    "desc": "The updated array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 44,
                "path": "src/Array/update.lua"
            }
        },
        {
            "name": "find",
            "desc": "Finds the index of the first item in the array that matches the value. This is\nmostly a wrapper around `table.find`, with the ability to specify a negative\nnumber as the start index (to search relative to the end of the array).\n\n#### Aliases\n`indexOf`\n\n```lua\nlocal array = { \"hello\", \"world\", \"hello\" }\n\nlocal index = Find(array, \"hello\") -- 1\nlocal index = Find(array, \"hello\", 2) -- 3\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to search.",
                    "lua_type": "{T}"
                },
                {
                    "name": "value?",
                    "desc": "The value to search for.",
                    "lua_type": "any"
                },
                {
                    "name": "from?",
                    "desc": "The index to start searching from.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The index of the first item in the array that matches the value.",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/Array/find.lua"
            }
        },
        {
            "name": "first",
            "desc": "Gets the first item in the array.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal value = First(array) -- 1\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to get the first item from.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The first item in the array.",
                    "lua_type": "T"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Array/first.lua"
            }
        },
        {
            "name": "map",
            "desc": "Maps the array using the mapper function.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Map(array, function(value, index)\n\treturn value * 2\nend) -- { 2, 4, 6 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to map.",
                    "lua_type": "{T}"
                },
                {
                    "name": "mapper",
                    "desc": "The mapper function.",
                    "lua_type": "(value: T, index: number, array: {T}) -> U?"
                }
            ],
            "returns": [
                {
                    "desc": "The mapped array.",
                    "lua_type": "{U}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/map.lua"
            }
        },
        {
            "name": "is",
            "desc": "Checks if the given object is an array.\n\n```lua\nlocal array = { 1, 2, 3 }\nlocal dictionary = { hello = \"world\" }\nlocal mixed = { 1, 2, hello = \"world\" }\n\nArray.is(array) -- true\nArray.is(dictionary) -- false\nArray.is(mixed) -- false\n```",
            "params": [
                {
                    "name": "object",
                    "desc": "The object to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the object is an array.",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "src/Array/is.lua"
            }
        },
        {
            "name": "reverse",
            "desc": "Reverses the order of the items in an array.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Reverse(array) -- { 3, 2, 1 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to reverse.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The reversed array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 17,
                "path": "src/Array/reverse.lua"
            }
        },
        {
            "name": "zip",
            "desc": "Zips multiple arrays together into a single array.\n\n```lua\nlocal table1 = { 1, 2, 3 }\nlocal table2 = { \"hello\", \"world\", \"goodbye\" }\n\nlocal new = Zip(table1, table2) -- { { 1, \"hello\" }, { 2, \"world\" }, { 3, \"goodbye\" } }\n```",
            "params": [
                {
                    "name": "...",
                    "desc": "The arrays to zip together.",
                    "lua_type": "{any}"
                }
            ],
            "returns": [
                {
                    "desc": "The zipped array.",
                    "lua_type": "{any}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/zip.lua"
            }
        },
        {
            "name": "flatten",
            "desc": "Flattens an array. If depth is not specified, it will flatten\nthe array as far as it can go.\n\n```lua\nlocal array = {\n\t{ 1, 2, 3 },\n\t{ 4, 5, 6 },\n\t{ 7, { 8, 9 } },\n}\n\nlocal new = Flatten(array) -- { 1, 2, 3, 4, 5, 6, 7, 8, 9 }\nlocal new = Flatten(array, 1) -- { 1, 2, 3, 4, 5, 6, 7, { 8, 9 } }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to flatten.",
                    "lua_type": "{T}"
                },
                {
                    "name": "depth?",
                    "desc": "The depth to flatten the array to.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The flattened array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 24,
                "path": "src/Array/flatten.lua"
            }
        },
        {
            "name": "includes",
            "desc": "Checks whether the array contains the value. This is a wrapper\naround `Find`.\n\n#### Aliases\n\n`contains`, `has`\n\n```lua\nlocal array = { \"hello\", \"world\", \"goodbye\" }\n\nlocal value = Includes(array, \"hello\") -- true\nlocal value = Includes(array, \"sift\") -- false\nlocal value = Includes(array, \"hello\", 2) -- false\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to search.",
                    "lua_type": "{T}"
                },
                {
                    "name": "value",
                    "desc": "The value to search for.",
                    "lua_type": "any"
                },
                {
                    "name": "from?",
                    "desc": "The index to start searching from.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the array contains the value.",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 28,
                "path": "src/Array/includes.lua"
            }
        },
        {
            "name": "removeValues",
            "desc": "Removes values from an array.\n\n```lua\nlocal array = { \"a\", \"b\", \"c\", \"c\", \"d\", \"e\" }\n\nlocal new = RemoveValues(array, \"c\", \"d\") -- { \"a\", \"b\", \"e\" }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to remove values from.",
                    "lua_type": "{T}"
                },
                {
                    "name": "...",
                    "desc": "The values to remove.",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "The array with the values removed.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/removeValues.lua"
            }
        },
        {
            "name": "create",
            "desc": "Creates an array of the given length, filled with the given value.\nThis is just a wrapper around `table.create`.\n\n```lua\nlocal array = Create(3, \"Hello\")\n\nprint(array) -- { \"Hello\", \"Hello\", \"Hello\" }\n```",
            "params": [
                {
                    "name": "length",
                    "desc": "The length of the array to create.",
                    "lua_type": "number"
                },
                {
                    "name": "value?",
                    "desc": "The value to fill the array with.",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "The created array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Array/create.lua"
            }
        },
        {
            "name": "splice",
            "desc": "Splices an array.\n\n```lua\nlocal array = { 1, 2, 3, 4, 5 }\n\nlocal new = Splice(array, 3, 4, 6, 7) -- { 1, 2, 6, 7, 4, 5 }\nlocal new = Splice(array, -1, 0, 6, 7) -- { 1, 2, 3, 4, 6, 7 }\nlocal new = Splice(array, 4, -1, 6, 7) -- { 1, 2, 3, 6, 7, 5 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to splice.",
                    "lua_type": "{T}"
                },
                {
                    "name": "start?",
                    "desc": "The index to start splicing at (can be negative).",
                    "lua_type": "number"
                },
                {
                    "name": "end?",
                    "desc": "The index to end splicing at (can be negative).",
                    "lua_type": "number"
                },
                {
                    "name": "...",
                    "desc": "The values to insert.",
                    "lua_type": "...T"
                }
            ],
            "returns": [
                {
                    "desc": "The spliced array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/Array/splice.lua"
            }
        },
        {
            "name": "difference",
            "desc": "Returns an array of values that are in the first array, but not in the other arrays.\n\n```lua\nlocal array1 = { \"hello\", \"world\" }\nlocal array2 = { \"cat\", \"dog\", \"hello\" }\n\nlocal difference = Difference(array1, array2) -- { \"world\" }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to compare.",
                    "lua_type": "Array<V>"
                },
                {
                    "name": "...",
                    "desc": "The arrays to compare against.",
                    "lua_type": "...Array<V>"
                }
            ],
            "returns": [
                {
                    "desc": "The difference between the arrays.",
                    "lua_type": "Array<V>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/Array/difference.lua"
            }
        },
        {
            "name": "last",
            "desc": "Gets the last element of the array.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal value = Last(array) -- 3\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to get the last element of.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The last element of the array.",
                    "lua_type": "T"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Array/last.lua"
            }
        },
        {
            "name": "removeIndex",
            "desc": "Removes a value from an array at the given index.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = RemoveIndex(array, 1) -- { 2, 3 }\nlocal new = RemoveIndex(array, -1) -- { 1, 3 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to remove the value from.",
                    "lua_type": "{T}"
                },
                {
                    "name": "index",
                    "desc": "The index to remove the value from (can be negative).",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The array with the value removed.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Array/removeIndex.lua"
            }
        },
        {
            "name": "toSet",
            "desc": "Converts an array to a set.\n\n```lua\nlocal array = { \"a\", \"b\", \"b\", \"c\", \"d\" }\n\nlocal set = ToSet(array) -- { a = true, b = true, c = true, d = true }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to convert to a set.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The set.",
                    "lua_type": "Set<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/toSet.lua"
            }
        },
        {
            "name": "removeValue",
            "desc": "Removes a value from an array.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = RemoveValue(array, 2) -- { 1, 3 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to remove the value from.",
                    "lua_type": "{T}"
                },
                {
                    "name": "value",
                    "desc": "The value to remove.",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "The array with the value removed.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 18,
                "path": "src/Array/removeValue.lua"
            }
        },
        {
            "name": "findWhere",
            "desc": "Finds the index of the first item in the array that passes the predicate.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal index = FindWhere(array, function(item, index)\n\treturn item > 1\nend) -- 2\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to search.",
                    "lua_type": "{T}"
                },
                {
                    "name": "predicate",
                    "desc": "The predicate to use to check the array.",
                    "lua_type": "(value: T, index: number, array: {T}) -> any"
                },
                {
                    "name": "from?",
                    "desc": "The index to start searching from.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The index of the first item in the array that matches the predicate.",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "src/Array/findWhere.lua"
            }
        },
        {
            "name": "reduceRight",
            "desc": "Reduces the array using the given reducer and initial accumulator value,\nstarting from the end of the array. If no `initialReduction` value is given,\nthe last item in the array is used.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal value = ReduceRight(array, function(accumulator, item, index)\n\treturn accumulator - item\nend) -- 0\n\nlocal value = ReduceRight(array, function(accumulator, item, index)\n\ttable.insert(accumulator, item)\n\treturn accumulator\nend, {}) -- { 3, 2, 1 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to reduce.",
                    "lua_type": "{T}"
                },
                {
                    "name": "reducer",
                    "desc": "The reducer to use.",
                    "lua_type": "(accumulator: U, value: T, index: number, array: {T}) -> U"
                },
                {
                    "name": "initialReduction?",
                    "desc": "The initial accumulator value.",
                    "lua_type": "U = {T}[#{T}]"
                }
            ],
            "returns": [
                {
                    "desc": "The final accumulator value.",
                    "lua_type": "U"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 28,
                "path": "src/Array/reduceRight.lua"
            }
        },
        {
            "name": "at",
            "desc": "Gets a value from an array at the given index.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal value = At(array, 1) -- 1\nlocal value = At(array, 0) -- 3\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to get the value from.",
                    "lua_type": "{T}"
                },
                {
                    "name": "index",
                    "desc": "The index to get the value from (can be negative).",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The value at the given index.",
                    "lua_type": "T"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Array/at.lua"
            }
        },
        {
            "name": "filter",
            "desc": "Filters an array using a filterer callback. Any items that do not pass the filterer will be removed from the array.\n\nIf no filterer is provided, all items will be kept.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal result = Filter(array, function(item, index)\n\treturn item > 1\nend) -- { 2, 3 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to filter.",
                    "lua_type": "{T}"
                },
                {
                    "name": "filterer?",
                    "desc": "The callback to use to filter the array.",
                    "lua_type": "(value: T, index: number, array: {T}) -> any"
                }
            ],
            "returns": [
                {
                    "desc": "The filtered array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 26,
                "path": "src/Array/filter.lua"
            }
        },
        {
            "name": "every",
            "desc": "Checks whether every item in the array passes the predicate.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal value = Every(array, function(item, index)\n\treturn item > 0\nend) -- true\n\nlocal value = Every(array, function(item, index)\n\treturn item > 1\nend) -- false\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to check.",
                    "lua_type": "{T}"
                },
                {
                    "name": "predicate",
                    "desc": "The predicate to use to check the array.",
                    "lua_type": "(value: T, index: number, array: {T}) -> any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether every item in the array passes the predicate.",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 24,
                "path": "src/Array/every.lua"
            }
        },
        {
            "name": "copyDeep",
            "desc": "Copies an array, with deep copies of all nested arrays.\n\n```lua\nlocal array = { 1, 2, 3, { 4, 5 } }\n\nlocal result = CopyDeep(array) -- { 1, 2, 3, { 4, 5 } }\n\nprint(result == array) -- false\nprint(result[4] == array[4]) -- false\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to copy.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The copied array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/copyDeep.lua"
            }
        },
        {
            "name": "unshift",
            "desc": "Inserts values to the beginning of an array.\n\n#### Aliases\n\n`prepend`\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Unshift(array, 4, 5) -- { 4, 5, 1, 2, 3 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to insert the values to.",
                    "lua_type": "{T}"
                },
                {
                    "name": "...",
                    "desc": "The values to insert.",
                    "lua_type": "...T"
                }
            ],
            "returns": [
                {
                    "desc": "The array with the values inserted.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/Array/unshift.lua"
            }
        },
        {
            "name": "shuffle",
            "desc": "Randomises the order of the items in an array.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Shuffle(array) -- { 2, 3, 1 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to shuffle.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The shuffled array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Array/shuffle.lua"
            }
        },
        {
            "name": "equalsDeep",
            "desc": "Compares two arrays for equality using deep comparison.\n\n```lua\nlocal array = { 1, 2, 3, { 4, 5 } }\nlocal other = { 1, 2, 3, { 4, 5 } }\n\nlocal value = EqualsDeep(array, other) -- true\nlocal value = EqualsDeep(array, other, { 1, 2, 3, { 4, 5 } }) -- true\nlocal value = EqualsDeep(array, other, { 1, 2, 3, { 4, 6 } }) -- false\n```",
            "params": [
                {
                    "name": "...",
                    "desc": "The arrays to compare.",
                    "lua_type": "...{any}"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the arrays are equal.",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 44,
                "path": "src/Array/equalsDeep.lua"
            }
        },
        {
            "name": "freeze",
            "desc": "Freezes the top level of the array, making it read-only.\n\n```lua\nlocal array = { 1, 2, 3, { 4, 5, 6 } }\n\nlocal new = Freeze(array)\n\nnew[1] = 4 -- error!\nnew[4][1] = 7 -- still works!\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to freeze.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The frozen array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/Array/freeze.lua"
            }
        },
        {
            "name": "removeIndices",
            "desc": "Removes values from an array at the given indices.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = RemoveIndices(array, 1, 2) -- { 3 }\nlocal new = RemoveIndices(array, 0, -1) -- { 1 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to remove the indices from.",
                    "lua_type": "{T}"
                },
                {
                    "name": "...",
                    "desc": "The indices to remove the values from (can be negative).",
                    "lua_type": "...number"
                }
            ],
            "returns": [
                {
                    "desc": "The array with the values removed.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Array/removeIndices.lua"
            }
        },
        {
            "name": "set",
            "desc": "Sets a value on an array at the given index.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Set(array, 2, 4) -- { 1, 4, 3 }\nlocal new = Set(array, -1, 4) -- { 1, 2, 4 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to set the value on.",
                    "lua_type": "{T}"
                },
                {
                    "name": "index",
                    "desc": "The index to set the value at (can be negative).",
                    "lua_type": "number"
                },
                {
                    "name": "value",
                    "desc": "The value to set.",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "The array with the value set.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/set.lua"
            }
        },
        {
            "name": "count",
            "desc": "Counts the number of items in an array.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal value = Count(array) -- 3\nlocal value = Count(array, function(item, index)\n\treturn item == 2\nend) -- 1\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to count the number of items in.",
                    "lua_type": "{T}"
                },
                {
                    "name": "predicate?",
                    "desc": "The predicate to use to filter the array.",
                    "lua_type": "(value: T, index: number, array: {T}) -> any"
                }
            ],
            "returns": [
                {
                    "desc": "The number of items in the array.",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/Array/count.lua"
            }
        },
        {
            "name": "shift",
            "desc": "Removes the first item from an array and returns the array\nwith the item removed.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal new = Shift(array) -- { 2, 3 }\nlocal new = Shift(array, 2) -- { 3 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to shift.",
                    "lua_type": "{T}"
                },
                {
                    "name": "count?",
                    "desc": "The number of items to shift.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The shifted array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/shift.lua"
            }
        },
        {
            "name": "findWhereLast",
            "desc": "Finds the index of the last item in the array that passes the predicate.\n\n```lua\nlocal array = { \"hello\", \"world\", \"hello\" }\n\nlocal index = FindWhereLast(array, function(item, index)\n\treturn item == \"hello\"\nend) -- 3\n\nlocal index = FindWhereLast(array, function(item, index)\n\treturn item == \"hello\"\nend, 2) -- 1\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to search.",
                    "lua_type": "{T}"
                },
                {
                    "name": "predicate",
                    "desc": "The predicate to use to check the array.",
                    "lua_type": "(value: T, index: number, array: {T}) -> any"
                },
                {
                    "name": "from?",
                    "desc": "The index to start searching from.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The index of the last item in the array that matches the predicate.",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/Array/findWhereLast.lua"
            }
        },
        {
            "name": "reduce",
            "desc": "Reduces the array using the given reducer and initial accumulator value.\nIf no `initialReduction` value is given, the first item in the array is used.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal value = Reduce(array, function(accumulator, item, index)\n\treturn accumulator - item\nend) -- -4\n\nlocal value = Reduce(array, function(accumulator, item, index)\n\ttable.insert(accumulator, item)\n\treturn accumulator\nend, {}) -- { 1, 2, 3 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to reduce.",
                    "lua_type": "{T}"
                },
                {
                    "name": "reducer",
                    "desc": "The reducer to use.",
                    "lua_type": "(accumulator: U, value: T, index: number, array: {T}) -> U"
                },
                {
                    "name": "initialReduction?",
                    "desc": "The initial accumulator value.",
                    "lua_type": "U = {T}[1]"
                }
            ],
            "returns": [
                {
                    "desc": "The final accumulator value.",
                    "lua_type": "U"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 27,
                "path": "src/Array/reduce.lua"
            }
        },
        {
            "name": "equals",
            "desc": "Compares two arrays for equality.\n\n```lua\nlocal array = { 1, 2, 3 }\nlocal other = { 1, 2, 3 }\n\nlocal value = Equals(array, other) -- true\nlocal value = Equals(array, other, { 1, 2, 3 }) -- true\nlocal value = Equals(array, other, { 1, 2, 4 }) -- false\n```",
            "params": [
                {
                    "name": "...",
                    "desc": "The arrays to compare.",
                    "lua_type": "...{any}"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the arrays are equal.",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 44,
                "path": "src/Array/equals.lua"
            }
        },
        {
            "name": "concatDeep",
            "desc": "Joins multiple arrays together into a single array, with deep copies of all\nnested arrays.\n\n#### Aliases\n\n`joinDeep`, `mergeDeep`\n\n```lua\nlocal table1 = { 1, 2, { 3, 4 } }\nlocal table2 = { 5, 6, { 7, 8 } }\n\nlocal new = ConcatDeep(table1, table2) -- { 1, 2, { 3, 4 }, 5, 6, { 7, 8 } }\n```",
            "params": [
                {
                    "name": "...",
                    "desc": "The arrays to concatenate.",
                    "lua_type": "...any"
                }
            ],
            "returns": [
                {
                    "desc": "The concatenated array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 28,
                "path": "src/Array/concatDeep.lua"
            }
        },
        {
            "name": "findLast",
            "desc": "Finds the index of the last item in the array that matches the value.\n\n```lua\nlocal array = { \"hello\", \"world\", \"hello\" }\n\nlocal index = FindLast(array, \"hello\") -- 3\nlocal index = FindLast(array, \"hello\", 2) -- 1\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to search.",
                    "lua_type": "{T}"
                },
                {
                    "name": "value?",
                    "desc": "The value to search for.",
                    "lua_type": "any"
                },
                {
                    "name": "from?",
                    "desc": "The index to start searching from.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The index of the last item in the array that matches the value.",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/Array/findLast.lua"
            }
        },
        {
            "name": "slice",
            "desc": "Slices an array.\n\n```lua\nlocal array = { 1, 2, 3, 4, 5 }\n\nlocal new = Slice(array, 2, 3) -- { 2, 3 }\nlocal new = Slice(array, -2, -1) -- { 3, 4 }\nlocal new = Slice(array, 3) -- { 3, 4, 5 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to slice.",
                    "lua_type": "{T}"
                },
                {
                    "name": "from?",
                    "desc": "The index to start from (can be negative).",
                    "lua_type": "number"
                },
                {
                    "name": "to?",
                    "desc": "The index to end at (can be negative).",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The sliced array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "src/Array/slice.lua"
            }
        },
        {
            "name": "zipAll",
            "desc": "Zips multiple arrays together into a single array, filling\nin missing values with `None`.\n\n```lua\nlocal table1 = { 1, 2, 3, 4 }\nlocal table2 = { \"hello\", \"world\", \"goodbye\" }\n\nlocal new = ZipAll(table1, table2) -- { { 1, \"hello\" }, { 2, \"world\" }, { 3, \"goodbye\" }, { 4, None } }\n```",
            "params": [
                {
                    "name": "...",
                    "desc": "The arrays to zip.",
                    "lua_type": "...{any}"
                }
            ],
            "returns": [
                {
                    "desc": "The zipped array.",
                    "lua_type": "{any}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 24,
                "path": "src/Array/zipAll.lua"
            }
        },
        {
            "name": "differenceSymmetric",
            "desc": "Returns an array of values that are in the first array, but not in the other arrays, and vice versa.\n\n```lua\nlocal array1 = { \"hello\", \"world\" }\nlocal array2 = { \"cat\", \"dog\", \"hello\" }\n\nlocal difference = DifferenceSymmetric(array1, array2) -- { \"world\", \"cat\", \"dog\" }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to compare.",
                    "lua_type": "Array<V>"
                },
                {
                    "name": "...",
                    "desc": "The arrays to compare against.",
                    "lua_type": "...Array<V>"
                }
            ],
            "returns": [
                {
                    "desc": "The symmetric difference between the arrays.",
                    "lua_type": "Array<V>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/Array/differenceSymmetric.lua"
            }
        },
        {
            "name": "some",
            "desc": "Checks whether some item in the array passes the predicate.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal value = Some(array, function(item, index)\n\treturn item > 1\nend) -- true\n\nlocal value = Some(array, function(item, index)\n\treturn item > 3\nend) -- false\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to check.",
                    "lua_type": "{T}"
                },
                {
                    "name": "predicate",
                    "desc": "The predicate to use to check the array.",
                    "lua_type": "(value: T, index: number, array: {T}) -> any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether some item in the array passes the predicate.",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 24,
                "path": "src/Array/some.lua"
            }
        },
        {
            "name": "insert",
            "desc": "Inserts the given values into an array at the given index, shifting all values after it to the right. If the index is negative (or 0), it is counted from the end of the array.\n\nIf the index to insert at is out of range, the array is not modified.\n\n```lua\nlocal array = { 1, 2, 3 }\n\nlocal newArray = Insert(array, 2, 4) -- { 1, 4, 2, 3 }\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to insert the value into.",
                    "lua_type": "{T}"
                },
                {
                    "name": "index",
                    "desc": "The index to insert the value at (can be negative).",
                    "lua_type": "number"
                },
                {
                    "name": "values",
                    "desc": "The values to insert.",
                    "lua_type": "...T"
                }
            ],
            "returns": [
                {
                    "desc": "The array with the value inserted.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "src/Array/insert.lua"
            }
        },
        {
            "name": "freezeDeep",
            "desc": "Freezes the entire array, making it read-only, including all\nnested arrays.\n\n```lua\nlocal array = { 1, 2, 3, { 4, 5, 6 } }\n\nlocal new = FreezeDeep(array)\n\nnew[1] = 4 -- error!\nnew[4][1] = 7 -- error!\n```",
            "params": [
                {
                    "name": "array",
                    "desc": "The array to freeze.",
                    "lua_type": "{T}"
                }
            ],
            "returns": [
                {
                    "desc": "The frozen array.",
                    "lua_type": "{T}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "src/Array/freezeDeep.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Array",
    "desc": "An array is a table consisting of index-value pairs. You don't need to\nmanually specify the indices when you create an array.\n\n```lua\nlocal array = {\n\t\"hello\",\n\t\"world\",\n}\n```\n\n<br><br>\n\n#### Aliases\n\n`List`",
    "source": {
        "line": 21,
        "path": "src/Array/init.lua"
    }
}