Skip to main content

Set

Utility functions involving sets, which are tables with the key as an index, and the value as a truthy value.

Functions

union

Set.union(
settable,
otherSettable
) → table

Unions the set with the other set, making a copy.

unionUpdate

Set.unionUpdate(
settable,
otherSettable
) → table

Unions the set with the other set, updating the set

intersection

Set.intersection(
settable,
otherSettable
) → table

Finds the set intersection betwen the two sets

copy

Set.copy(settable) → table

Makes a copy of the set, making the values as true.

fromKeys

Set.fromKeys(tabtable) → table

Makes a new set from the given keys of a table

fromTableValue

Set.fromTableValue(tabtable) → table

Converts a set from table values.

fromList

Set.fromList(tabtable) → table

Converts a set from a list

toList

Set.toList(settable) → table

Converts a set to a list

differenceUpdate

Set.differenceUpdate(
settable,
otherSettable
) → table

Converts a set to a list

difference

Set.difference(
settable,
otherSettable
) → table

Computes the set difference between the two sets

Show raw api
{
    "functions": [
        {
            "name": "union",
            "desc": "Unions the set with the other set, making a copy.",
            "params": [
                {
                    "name": "set",
                    "desc": "",
                    "lua_type": "table"
                },
                {
                    "name": "otherSet",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 15,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "unionUpdate",
            "desc": "Unions the set with the other set, updating the `set`",
            "params": [
                {
                    "name": "set",
                    "desc": "",
                    "lua_type": "table"
                },
                {
                    "name": "otherSet",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 32,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "intersection",
            "desc": "Finds the set intersection betwen the two sets",
            "params": [
                {
                    "name": "set",
                    "desc": "",
                    "lua_type": "table"
                },
                {
                    "name": "otherSet",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 44,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "copy",
            "desc": "Makes a copy of the set, making the values as true.",
            "params": [
                {
                    "name": "set",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 59,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "fromKeys",
            "desc": "Makes a new set from the given keys of a table",
            "params": [
                {
                    "name": "tab",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 72,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "fromTableValue",
            "desc": "Converts a set from table values.",
            "params": [
                {
                    "name": "tab",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 85,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "fromList",
            "desc": "Converts a set from a list",
            "params": [
                {
                    "name": "tab",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 102,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "toList",
            "desc": "Converts a set to a list",
            "params": [
                {
                    "name": "set",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 109,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "differenceUpdate",
            "desc": "Converts a set to a list",
            "params": [
                {
                    "name": "set",
                    "desc": "",
                    "lua_type": "table"
                },
                {
                    "name": "otherSet",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 125,
                "path": "src/table/src/Shared/Set.lua"
            }
        },
        {
            "name": "difference",
            "desc": "Computes the set difference between the two sets",
            "params": [
                {
                    "name": "set",
                    "desc": "",
                    "lua_type": "table"
                },
                {
                    "name": "otherSet",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 137,
                "path": "src/table/src/Shared/Set.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Set",
    "desc": "Utility functions involving sets, which are tables with the key as an index, and the value as a\ntruthy value.",
    "source": {
        "line": 6,
        "path": "src/table/src/Shared/Set.lua"
    }
}